Toniolo and Linder, Equation (13)

Percentage Accurate: 49.3% → 79.8%
Time: 10.4s
Alternatives: 18
Speedup: 1.3×

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_)))));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
    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}

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 18 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.3% 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_)))));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
    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: 79.8% accurate, 0.5× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \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) \leq \infty:\\ \;\;\;\;\left(\sqrt{\left|U + U\right|} \cdot \sqrt{\left|\mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U* - U\right), \frac{l\_m}{Om}, -2 \cdot l\_m\right), \frac{l\_m}{Om}, t\right)\right|}\right) \cdot \sqrt{\left|n\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot l\_m\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<=
      (*
       (* (* 2.0 n) U)
       (-
        (- t (* 2.0 (/ (* l_m l_m) Om)))
        (* (* n (pow (/ l_m Om) 2.0)) (- U U*))))
      INFINITY)
   (*
    (*
     (sqrt (fabs (+ U U)))
     (sqrt
      (fabs (fma (fma (* n (- U* U)) (/ l_m Om) (* -2.0 l_m)) (/ l_m Om) t))))
    (sqrt (fabs n)))
   (* (sqrt (* (* (/ (fma n (/ (* (- U U*) n) Om) (+ n n)) Om) U) -2.0)) l_m)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if ((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))) <= ((double) INFINITY)) {
		tmp = (sqrt(fabs((U + U))) * sqrt(fabs(fma(fma((n * (U_42_ - U)), (l_m / Om), (-2.0 * l_m)), (l_m / Om), t)))) * sqrt(fabs(n));
	} else {
		tmp = sqrt((((fma(n, (((U - U_42_) * n) / Om), (n + n)) / Om) * U) * -2.0)) * l_m;
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))) <= Inf)
		tmp = Float64(Float64(sqrt(abs(Float64(U + U))) * sqrt(abs(fma(fma(Float64(n * Float64(U_42_ - U)), Float64(l_m / Om), Float64(-2.0 * l_m)), Float64(l_m / Om), t)))) * sqrt(abs(n)));
	else
		tmp = Float64(sqrt(Float64(Float64(Float64(fma(n, Float64(Float64(Float64(U - U_42_) * n) / Om), Float64(n + n)) / Om) * U) * -2.0)) * l_m);
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * 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 - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[Sqrt[N[Abs[N[(U + U), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Abs[n], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(N[(n * N[(N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] + N[(n + n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * U), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] * l$95$m), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \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) \leq \infty:\\
\;\;\;\;\left(\sqrt{\left|U + U\right|} \cdot \sqrt{\left|\mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U* - U\right), \frac{l\_m}{Om}, -2 \cdot l\_m\right), \frac{l\_m}{Om}, t\right)\right|}\right) \cdot \sqrt{\left|n\right|}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 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*)))) < +inf.0

    1. Initial program 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\left|U + U\right|} \cdot \color{blue}{\sqrt{\left|\frac{\ell \cdot \mathsf{fma}\left(U* - U, n \cdot \frac{\ell}{Om}, -2 \cdot \ell\right)}{Om} + t\right|}}\right) \cdot \sqrt{\left|n\right|} \]
      10. lower-fabs.f6475.1

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

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

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

    if +inf.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*))))

    1. Initial program 49.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. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      11. lower-pow.f6428.5

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      3. distribute-rgt-inN/A

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(2 \cdot \frac{1}{Om}, n, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}} \cdot n\right)\right)} \]
      6. mult-flip-revN/A

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      12. lower-*.f6427.6

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      14. *-commutativeN/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{{Om}^{2}}\right)\right)} \]
      15. lower-*.f6427.6

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
      18. lower-*.f6427.6

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
    6. Applied rewrites27.6%

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

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

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

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

      \[\leadsto \sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot \color{blue}{\ell} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 75.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \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)\\
t_2 := \sqrt{\left|U + U\right|} \cdot \sqrt{\left|\mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U* - U\right), \frac{l\_m}{Om}, -2 \cdot l\_m\right), \frac{l\_m}{Om}, t\right) \cdot n\right|}\\
\mathbf{if}\;t\_1 \leq 10^{-253}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+290}:\\
\;\;\;\;\sqrt{\left|\left(\frac{l\_m \cdot \mathsf{fma}\left(U* - U, n \cdot \frac{l\_m}{Om}, -2 \cdot l\_m\right)}{Om} + t\right) \cdot \left(\left(U + U\right) \cdot n\right)\right|}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\

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


\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*)))) < 1.0000000000000001e-253 or 4.9999999999999998e290 < (*.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 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left|U + U\right| \cdot \left(\left|\frac{\ell \cdot \mathsf{fma}\left(U* - U, n \cdot \frac{\ell}{Om}, -2 \cdot \ell\right)}{Om} + t\right| \cdot \left|n\right|\right)}} \]
    8. Applied rewrites65.2%

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

    if 1.0000000000000001e-253 < (*.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.9999999999999998e290

    1. Initial program 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left|\left(\frac{\ell \cdot \left(\left(\frac{\ell}{Om} \cdot n\right) \cdot \left(U* - U\right)\right) + \color{blue}{\ell \cdot \left(\ell \cdot -2\right)}}{Om} + t\right) \cdot \left(\left(U + U\right) \cdot n\right)\right|} \]
      7. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

    if +inf.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*))))

    1. Initial program 49.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. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      11. lower-pow.f6428.5

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      3. distribute-rgt-inN/A

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(2 \cdot \frac{1}{Om}, n, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}} \cdot n\right)\right)} \]
      6. mult-flip-revN/A

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      12. lower-*.f6427.6

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      14. *-commutativeN/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{{Om}^{2}}\right)\right)} \]
      15. lower-*.f6427.6

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
      18. lower-*.f6427.6

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
    6. Applied rewrites27.6%

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

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

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

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

      \[\leadsto \sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot \color{blue}{\ell} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 74.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \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)\\
t_2 := \sqrt{\left|\mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U* - U\right), \frac{l\_m}{Om}, -2 \cdot l\_m\right), \frac{l\_m}{Om}, t\right) \cdot \left(U + U\right)\right|} \cdot \sqrt{\left|n\right|}\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\

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


\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 or 1.9999999999999999e305 < (*.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 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left|\left(\frac{\ell \cdot \left(\left(\frac{\ell}{Om} \cdot n\right) \cdot \left(U* - U\right)\right) + \color{blue}{\ell \cdot \left(\ell \cdot -2\right)}}{Om} + t\right) \cdot \left(\left(U + U\right) \cdot n\right)\right|} \]
      7. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

    if +inf.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*))))

    1. Initial program 49.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. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      11. lower-pow.f6428.5

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      3. distribute-rgt-inN/A

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(2 \cdot \frac{1}{Om}, n, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}} \cdot n\right)\right)} \]
      6. mult-flip-revN/A

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      12. lower-*.f6427.6

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      14. *-commutativeN/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{{Om}^{2}}\right)\right)} \]
      15. lower-*.f6427.6

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
      18. lower-*.f6427.6

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
    6. Applied rewrites27.6%

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

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

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

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

      \[\leadsto \sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot \color{blue}{\ell} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 72.1% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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\_1 \leq 0:\\ \;\;\;\;\sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+145}:\\ \;\;\;\;\sqrt{\left|\left(\frac{l\_m \cdot \mathsf{fma}\left(U* - U, n \cdot \frac{l\_m}{Om}, -2 \cdot l\_m\right)}{Om} + t\right) \cdot \left(\left(U + U\right) \cdot n\right)\right|}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\sqrt{\left(n \cdot \left(U + U\right)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U* - U\right), \frac{l\_m}{Om}, -2 \cdot l\_m\right), \frac{l\_m}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot l\_m\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 2.0 n) U)
           (-
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))))
   (if (<= t_1 0.0)
     (*
      (sqrt (fabs (* (+ U U) (+ (/ (* l_m (* -2.0 l_m)) Om) t))))
      (sqrt (fabs n)))
     (if (<= t_1 4e+145)
       (sqrt
        (fabs
         (*
          (+ (/ (* l_m (fma (- U* U) (* n (/ l_m Om)) (* -2.0 l_m))) Om) t)
          (* (+ U U) n))))
       (if (<= t_1 INFINITY)
         (sqrt
          (*
           (* n (+ U U))
           (fma (fma (* n (- U* U)) (/ l_m Om) (* -2.0 l_m)) (/ l_m Om) t)))
         (*
          (sqrt (* (* (/ (fma n (/ (* (- U U*) n) Om) (+ n n)) Om) U) -2.0))
          l_m))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = sqrt(fabs(((U + U) * (((l_m * (-2.0 * l_m)) / Om) + t)))) * sqrt(fabs(n));
	} else if (t_1 <= 4e+145) {
		tmp = sqrt(fabs(((((l_m * fma((U_42_ - U), (n * (l_m / Om)), (-2.0 * l_m))) / Om) + t) * ((U + U) * n))));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = sqrt(((n * (U + U)) * fma(fma((n * (U_42_ - U)), (l_m / Om), (-2.0 * l_m)), (l_m / Om), t)));
	} else {
		tmp = sqrt((((fma(n, (((U - U_42_) * n) / Om), (n + n)) / Om) * U) * -2.0)) * l_m;
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))))
	tmp = 0.0
	if (t_1 <= 0.0)
		tmp = Float64(sqrt(abs(Float64(Float64(U + U) * Float64(Float64(Float64(l_m * Float64(-2.0 * l_m)) / Om) + t)))) * sqrt(abs(n)));
	elseif (t_1 <= 4e+145)
		tmp = sqrt(abs(Float64(Float64(Float64(Float64(l_m * fma(Float64(U_42_ - U), Float64(n * Float64(l_m / Om)), Float64(-2.0 * l_m))) / Om) + t) * Float64(Float64(U + U) * n))));
	elseif (t_1 <= Inf)
		tmp = sqrt(Float64(Float64(n * Float64(U + U)) * fma(fma(Float64(n * Float64(U_42_ - U)), Float64(l_m / Om), Float64(-2.0 * l_m)), Float64(l_m / Om), t)));
	else
		tmp = Float64(sqrt(Float64(Float64(Float64(fma(n, Float64(Float64(Float64(U - U_42_) * n) / Om), Float64(n + n)) / Om) * U) * -2.0)) * l_m);
	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[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * 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 - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[Abs[N[(N[(U + U), $MachinePrecision] * N[(N[(N[(l$95$m * N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[n], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+145], N[Sqrt[N[Abs[N[(N[(N[(N[(l$95$m * N[(N[(U$42$ - U), $MachinePrecision] * N[(n * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(N[(U + U), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[Sqrt[N[(N[(n * N[(U + U), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(N[(n * N[(N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] + N[(n + n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * U), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] * l$95$m), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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\_1 \leq 0:\\
\;\;\;\;\sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+145}:\\
\;\;\;\;\sqrt{\left|\left(\frac{l\_m \cdot \mathsf{fma}\left(U* - U, n \cdot \frac{l\_m}{Om}, -2 \cdot l\_m\right)}{Om} + t\right) \cdot \left(\left(U + U\right) \cdot n\right)\right|}\\

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

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


\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*))))) < 0.0

    1. Initial program 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \color{blue}{\left(-2 \cdot \ell\right)}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    8. Step-by-step derivation
      1. lower-*.f6456.1

        \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \left(-2 \cdot \color{blue}{\ell}\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    9. Applied rewrites56.1%

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

    1. Initial program 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left|\left(\frac{\ell \cdot \left(\left(\frac{\ell}{Om} \cdot n\right) \cdot \left(U* - U\right)\right) + \color{blue}{\ell \cdot \left(\ell \cdot -2\right)}}{Om} + t\right) \cdot \left(\left(U + U\right) \cdot n\right)\right|} \]
      7. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

    if 4e145 < (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 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot \left(U + U\right)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U* - U\right), \frac{\ell}{Om}, -2 \cdot \ell\right), \frac{\ell}{Om}, t\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 49.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. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      11. lower-pow.f6428.5

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      3. distribute-rgt-inN/A

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(2 \cdot \frac{1}{Om}, n, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}} \cdot n\right)\right)} \]
      6. mult-flip-revN/A

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      12. lower-*.f6427.6

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      14. *-commutativeN/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{{Om}^{2}}\right)\right)} \]
      15. lower-*.f6427.6

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
      18. lower-*.f6427.6

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
    6. Applied rewrites27.6%

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

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

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

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

      \[\leadsto \sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot \color{blue}{\ell} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 5: 70.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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\_1 \leq 0:\\
\;\;\;\;\sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\

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

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


\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 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \color{blue}{\left(-2 \cdot \ell\right)}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    8. Step-by-step derivation
      1. lower-*.f6456.1

        \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \left(-2 \cdot \color{blue}{\ell}\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    9. Applied rewrites56.1%

      \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \color{blue}{\left(-2 \cdot \ell\right)}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\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 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot \left(U + U\right)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U* - U\right), \frac{\ell}{Om}, -2 \cdot \ell\right), \frac{\ell}{Om}, t\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 49.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. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      11. lower-pow.f6428.5

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      3. distribute-rgt-inN/A

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(2 \cdot \frac{1}{Om}, n, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}} \cdot n\right)\right)} \]
      6. mult-flip-revN/A

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      12. lower-*.f6427.6

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      14. *-commutativeN/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{{Om}^{2}}\right)\right)} \]
      15. lower-*.f6427.6

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
      18. lower-*.f6427.6

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
    6. Applied rewrites27.6%

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

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

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

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

      \[\leadsto \sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot \color{blue}{\ell} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 67.0% accurate, 1.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := U \cdot \left(\left(n \cdot \frac{l\_m}{Om}\right) \cdot l\_m\right)\\ \mathbf{if}\;l\_m \leq 2.35 \cdot 10^{+25}:\\ \;\;\;\;\sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \frac{U* \cdot \left(l\_m \cdot n\right)}{Om}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\ \mathbf{elif}\;l\_m \leq 4.4 \cdot 10^{+80}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(t + t, U \cdot n, t\_1 \cdot -4\right)}\\ \mathbf{elif}\;l\_m \leq 4 \cdot 10^{+257}:\\ \;\;\;\;\sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot l\_m\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\mathsf{fma}\left(t\_1, -4, \left(\left(t + t\right) \cdot U\right) \cdot n\right)\right|}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* U (* (* n (/ l_m Om)) l_m))))
   (if (<= l_m 2.35e+25)
     (*
      (sqrt (fabs (* (+ U U) (+ (/ (* l_m (/ (* U* (* l_m n)) Om)) Om) t))))
      (sqrt (fabs n)))
     (if (<= l_m 4.4e+80)
       (sqrt (fma (+ t t) (* U n) (* t_1 -4.0)))
       (if (<= l_m 4e+257)
         (*
          (sqrt (* (* (/ (fma n (/ (* (- U U*) n) Om) (+ n n)) Om) U) -2.0))
          l_m)
         (sqrt (fabs (fma t_1 -4.0 (* (* (+ t t) U) n)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = U * ((n * (l_m / Om)) * l_m);
	double tmp;
	if (l_m <= 2.35e+25) {
		tmp = sqrt(fabs(((U + U) * (((l_m * ((U_42_ * (l_m * n)) / Om)) / Om) + t)))) * sqrt(fabs(n));
	} else if (l_m <= 4.4e+80) {
		tmp = sqrt(fma((t + t), (U * n), (t_1 * -4.0)));
	} else if (l_m <= 4e+257) {
		tmp = sqrt((((fma(n, (((U - U_42_) * n) / Om), (n + n)) / Om) * U) * -2.0)) * l_m;
	} else {
		tmp = sqrt(fabs(fma(t_1, -4.0, (((t + t) * U) * n))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(U * Float64(Float64(n * Float64(l_m / Om)) * l_m))
	tmp = 0.0
	if (l_m <= 2.35e+25)
		tmp = Float64(sqrt(abs(Float64(Float64(U + U) * Float64(Float64(Float64(l_m * Float64(Float64(U_42_ * Float64(l_m * n)) / Om)) / Om) + t)))) * sqrt(abs(n)));
	elseif (l_m <= 4.4e+80)
		tmp = sqrt(fma(Float64(t + t), Float64(U * n), Float64(t_1 * -4.0)));
	elseif (l_m <= 4e+257)
		tmp = Float64(sqrt(Float64(Float64(Float64(fma(n, Float64(Float64(Float64(U - U_42_) * n) / Om), Float64(n + n)) / Om) * U) * -2.0)) * l_m);
	else
		tmp = sqrt(abs(fma(t_1, -4.0, Float64(Float64(Float64(t + t) * U) * n))));
	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[(N[(n * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * l$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l$95$m, 2.35e+25], N[(N[Sqrt[N[Abs[N[(N[(U + U), $MachinePrecision] * N[(N[(N[(l$95$m * N[(N[(U$42$ * N[(l$95$m * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[n], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 4.4e+80], N[Sqrt[N[(N[(t + t), $MachinePrecision] * N[(U * n), $MachinePrecision] + N[(t$95$1 * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 4e+257], N[(N[Sqrt[N[(N[(N[(N[(n * N[(N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] + N[(n + n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * U), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] * l$95$m), $MachinePrecision], N[Sqrt[N[Abs[N[(t$95$1 * -4.0 + N[(N[(N[(t + t), $MachinePrecision] * U), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := U \cdot \left(\left(n \cdot \frac{l\_m}{Om}\right) \cdot l\_m\right)\\
\mathbf{if}\;l\_m \leq 2.35 \cdot 10^{+25}:\\
\;\;\;\;\sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \frac{U* \cdot \left(l\_m \cdot n\right)}{Om}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\

\mathbf{elif}\;l\_m \leq 4.4 \cdot 10^{+80}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(t + t, U \cdot n, t\_1 \cdot -4\right)}\\

\mathbf{elif}\;l\_m \leq 4 \cdot 10^{+257}:\\
\;\;\;\;\sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot l\_m\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\mathsf{fma}\left(t\_1, -4, \left(\left(t + t\right) \cdot U\right) \cdot n\right)\right|}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 2.3499999999999999e25

    1. Initial program 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \frac{U* \cdot \left(\ell \cdot n\right)}{Om}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
      3. lower-*.f6456.8

        \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \frac{U* \cdot \left(\ell \cdot n\right)}{Om}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    9. Applied rewrites56.8%

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

    if 2.3499999999999999e25 < l < 4.40000000000000005e80

    1. Initial program 49.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. Taylor expanded in Om around inf

      \[\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)}} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(-4, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}, 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)} \]
      8. lower-*.f6442.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(t + t, U \cdot n, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om} \cdot -4\right)} \]
    6. Applied rewrites49.8%

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

    if 4.40000000000000005e80 < l < 4.00000000000000012e257

    1. Initial program 49.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. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      11. lower-pow.f6428.5

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      3. distribute-rgt-inN/A

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(2 \cdot \frac{1}{Om}, n, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}} \cdot n\right)\right)} \]
      6. mult-flip-revN/A

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      12. lower-*.f6427.6

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      14. *-commutativeN/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{{Om}^{2}}\right)\right)} \]
      15. lower-*.f6427.6

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
      18. lower-*.f6427.6

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
    6. Applied rewrites27.6%

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

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

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

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

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

    if 4.00000000000000012e257 < l

    1. Initial program 49.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. Taylor expanded in Om around inf

      \[\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)}} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(-4, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}, 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)} \]
      8. lower-*.f6442.2

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

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

      \[\leadsto \sqrt{\color{blue}{\left|\mathsf{fma}\left(U \cdot \left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \ell\right), -4, \left(\left(t + t\right) \cdot U\right) \cdot n\right)\right|}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 7: 64.3% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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\_1 \leq 2 \cdot 10^{+27}:\\ \;\;\;\;\sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(t + t, U \cdot n, \left(U \cdot \left(\left(n \cdot \frac{l\_m}{Om}\right) \cdot l\_m\right)\right) \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot l\_m\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 2.0 n) U)
           (-
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))))
   (if (<= t_1 2e+27)
     (*
      (sqrt (fabs (* (+ U U) (+ (/ (* l_m (* -2.0 l_m)) Om) t))))
      (sqrt (fabs n)))
     (if (<= t_1 5e+152)
       (sqrt (fma (+ t t) (* U n) (* (* U (* (* n (/ l_m Om)) l_m)) -4.0)))
       (*
        (sqrt (* (* (/ (fma n (/ (* (- U U*) n) Om) (+ n n)) Om) U) -2.0))
        l_m)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))));
	double tmp;
	if (t_1 <= 2e+27) {
		tmp = sqrt(fabs(((U + U) * (((l_m * (-2.0 * l_m)) / Om) + t)))) * sqrt(fabs(n));
	} else if (t_1 <= 5e+152) {
		tmp = sqrt(fma((t + t), (U * n), ((U * ((n * (l_m / Om)) * l_m)) * -4.0)));
	} else {
		tmp = sqrt((((fma(n, (((U - U_42_) * n) / Om), (n + n)) / Om) * U) * -2.0)) * l_m;
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))))
	tmp = 0.0
	if (t_1 <= 2e+27)
		tmp = Float64(sqrt(abs(Float64(Float64(U + U) * Float64(Float64(Float64(l_m * Float64(-2.0 * l_m)) / Om) + t)))) * sqrt(abs(n)));
	elseif (t_1 <= 5e+152)
		tmp = sqrt(fma(Float64(t + t), Float64(U * n), Float64(Float64(U * Float64(Float64(n * Float64(l_m / Om)) * l_m)) * -4.0)));
	else
		tmp = Float64(sqrt(Float64(Float64(Float64(fma(n, Float64(Float64(Float64(U - U_42_) * n) / Om), Float64(n + n)) / Om) * U) * -2.0)) * l_m);
	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[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * 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 - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 2e+27], N[(N[Sqrt[N[Abs[N[(N[(U + U), $MachinePrecision] * N[(N[(N[(l$95$m * N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[n], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+152], N[Sqrt[N[(N[(t + t), $MachinePrecision] * N[(U * n), $MachinePrecision] + N[(N[(U * N[(N[(n * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * l$95$m), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(N[(n * N[(N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] + N[(n + n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * U), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] * l$95$m), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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\_1 \leq 2 \cdot 10^{+27}:\\
\;\;\;\;\sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(t + t, U \cdot n, \left(U \cdot \left(\left(n \cdot \frac{l\_m}{Om}\right) \cdot l\_m\right)\right) \cdot -4\right)}\\

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


\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*))))) < 2e27

    1. Initial program 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \color{blue}{\left(-2 \cdot \ell\right)}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    8. Step-by-step derivation
      1. lower-*.f6456.1

        \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \left(-2 \cdot \color{blue}{\ell}\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    9. Applied rewrites56.1%

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

    if 2e27 < (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*))))) < 5e152

    1. Initial program 49.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. Taylor expanded in Om around inf

      \[\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)}} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(-4, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}, 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)} \]
      8. lower-*.f6442.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(t + t, U \cdot n, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om} \cdot -4\right)} \]
    6. Applied rewrites49.8%

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

    if 5e152 < (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 49.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. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      11. lower-pow.f6428.5

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      3. distribute-rgt-inN/A

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(2 \cdot \frac{1}{Om}, n, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}} \cdot n\right)\right)} \]
      6. mult-flip-revN/A

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      12. lower-*.f6427.6

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      14. *-commutativeN/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{{Om}^{2}}\right)\right)} \]
      15. lower-*.f6427.6

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
      18. lower-*.f6427.6

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{2}{Om}, n, \frac{n \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om}\right)\right)} \]
    6. Applied rewrites27.6%

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

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

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

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

      \[\leadsto \sqrt{\left(\frac{\mathsf{fma}\left(n, \frac{\left(U - U*\right) \cdot n}{Om}, n + n\right)}{Om} \cdot U\right) \cdot -2} \cdot \color{blue}{\ell} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 8: 63.8% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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\_1 \leq 2 \cdot 10^{+27}:\\ \;\;\;\;\sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(t + t, U \cdot n, \left(U \cdot \left(\left(n \cdot \frac{l\_m}{Om}\right) \cdot l\_m\right)\right) \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \frac{2 + \frac{n \cdot \left(U - U*\right)}{Om}}{Om}\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 2.0 n) U)
           (-
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))))
   (if (<= t_1 2e+27)
     (*
      (sqrt (fabs (* (+ U U) (+ (/ (* l_m (* -2.0 l_m)) Om) t))))
      (sqrt (fabs n)))
     (if (<= t_1 INFINITY)
       (sqrt (fma (+ t t) (* U n) (* (* U (* (* n (/ l_m Om)) l_m)) -4.0)))
       (*
        l_m
        (sqrt (* -2.0 (* U (* n (/ (+ 2.0 (/ (* n (- U U*)) Om)) Om))))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))));
	double tmp;
	if (t_1 <= 2e+27) {
		tmp = sqrt(fabs(((U + U) * (((l_m * (-2.0 * l_m)) / Om) + t)))) * sqrt(fabs(n));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = sqrt(fma((t + t), (U * n), ((U * ((n * (l_m / Om)) * l_m)) * -4.0)));
	} else {
		tmp = l_m * sqrt((-2.0 * (U * (n * ((2.0 + ((n * (U - U_42_)) / Om)) / Om)))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))))
	tmp = 0.0
	if (t_1 <= 2e+27)
		tmp = Float64(sqrt(abs(Float64(Float64(U + U) * Float64(Float64(Float64(l_m * Float64(-2.0 * l_m)) / Om) + t)))) * sqrt(abs(n)));
	elseif (t_1 <= Inf)
		tmp = sqrt(fma(Float64(t + t), Float64(U * n), Float64(Float64(U * Float64(Float64(n * Float64(l_m / Om)) * l_m)) * -4.0)));
	else
		tmp = Float64(l_m * sqrt(Float64(-2.0 * Float64(U * Float64(n * Float64(Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om)) / Om))))));
	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[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * 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 - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 2e+27], N[(N[Sqrt[N[Abs[N[(N[(U + U), $MachinePrecision] * N[(N[(N[(l$95$m * N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[n], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[Sqrt[N[(N[(t + t), $MachinePrecision] * N[(U * n), $MachinePrecision] + N[(N[(U * N[(N[(n * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * l$95$m), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(-2.0 * N[(U * N[(n * N[(N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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\_1 \leq 2 \cdot 10^{+27}:\\
\;\;\;\;\sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\

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

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


\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*))))) < 2e27

    1. Initial program 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \color{blue}{\left(-2 \cdot \ell\right)}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    8. Step-by-step derivation
      1. lower-*.f6456.1

        \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \left(-2 \cdot \color{blue}{\ell}\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    9. Applied rewrites56.1%

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

    if 2e27 < (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 49.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. Taylor expanded in Om around inf

      \[\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)}} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(-4, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}, 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)} \]
      8. lower-*.f6442.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(t + t, U \cdot n, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om} \cdot -4\right)} \]
    6. Applied rewrites49.8%

      \[\leadsto \sqrt{\mathsf{fma}\left(t + t, \color{blue}{U \cdot n}, \left(U \cdot \left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \ell\right)\right) \cdot -4\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 49.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. Taylor expanded in l around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      11. lower-pow.f6428.5

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

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \frac{2 + \frac{n \cdot \left(U - U*\right)}{Om}}{Om}\right)\right)} \]
      5. lower--.f6432.3

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

      \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \frac{2 + \frac{n \cdot \left(U - U*\right)}{Om}}{Om}\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 58.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \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)\\
t_2 := \sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+28}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+305}:\\
\;\;\;\;\sqrt{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}\\

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

\mathbf{else}:\\
\;\;\;\;t\_2\\


\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*)))) < 1.99999999999999992e28 or +inf.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*))))

    1. Initial program 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \color{blue}{\left(-2 \cdot \ell\right)}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    8. Step-by-step derivation
      1. lower-*.f6456.1

        \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \left(-2 \cdot \color{blue}{\ell}\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    9. Applied rewrites56.1%

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

    if 1.99999999999999992e28 < (*.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.9999999999999999e305

    1. Initial program 49.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. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t} \]
      7. associate-*l*N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      10. lower-*.f6434.9

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot t} \]
      14. associate-*l*N/A

        \[\leadsto \sqrt{\left(n \cdot \left(2 \cdot U\right)\right) \cdot t} \]
      15. count-2N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      16. lift-+.f64N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      17. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
      18. lower-*.f6434.9

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
    6. Applied rewrites34.9%

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot n} \]
      7. distribute-lft-inN/A

        \[\leadsto \sqrt{\left(t \cdot U + t \cdot U\right) \cdot n} \]
      8. distribute-rgt-inN/A

        \[\leadsto \sqrt{\left(U \cdot \left(t + t\right)\right) \cdot n} \]
      9. lift-+.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \left(t + t\right)\right) \cdot n} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + t\right) \cdot U\right) \cdot n} \]
      11. lift-*.f6434.6

        \[\leadsto \sqrt{\left(\left(t + t\right) \cdot U\right) \cdot n} \]
      12. rem-exp-logN/A

        \[\leadsto \sqrt{\color{blue}{e^{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}}} \]
      13. lift-log.f64N/A

        \[\leadsto \sqrt{e^{\color{blue}{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}}} \]
      14. exp-fabsN/A

        \[\leadsto \sqrt{\color{blue}{\left|e^{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}\right|}} \]
    8. Applied rewrites37.5%

      \[\leadsto \sqrt{\color{blue}{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}} \]

    if 1.9999999999999999e305 < (*.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 49.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. Taylor expanded in Om around inf

      \[\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)}} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(-4, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}, 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)} \]
      8. lower-*.f6442.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(\left(U + U\right) \cdot t, n, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      14. *-commutativeN/A

        \[\leadsto \sqrt{\mathsf{fma}\left(t \cdot \left(U + U\right), n, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      15. lift-+.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(t \cdot \left(U + U\right), n, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      16. count-2N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(t \cdot \left(2 \cdot U\right), n, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      17. associate-*r*N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(\left(t \cdot 2\right) \cdot U, n, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      18. *-commutativeN/A

        \[\leadsto \sqrt{\mathsf{fma}\left(\left(2 \cdot t\right) \cdot U, n, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      19. count-2N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(\left(t + t\right) \cdot U, n, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      20. lift-+.f64N/A

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

        \[\leadsto \sqrt{\mathsf{fma}\left(\left(t + t\right) \cdot U, n, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      22. *-commutativeN/A

        \[\leadsto \sqrt{\mathsf{fma}\left(\left(t + t\right) \cdot U, n, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om} \cdot -4\right)} \]
      23. lower-*.f6442.4

        \[\leadsto \sqrt{\mathsf{fma}\left(\left(t + t\right) \cdot U, n, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om} \cdot -4\right)} \]
    6. Applied rewrites49.6%

      \[\leadsto \sqrt{\mathsf{fma}\left(\left(t + t\right) \cdot U, \color{blue}{n}, \left(U \cdot \left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \ell\right)\right) \cdot -4\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 10: 58.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \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)\\
t_2 := \sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+54}:\\
\;\;\;\;t\_2\\

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

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 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*)))) < 5.00000000000000005e54 or +inf.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*))))

    1. Initial program 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \color{blue}{\left(-2 \cdot \ell\right)}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    8. Step-by-step derivation
      1. lower-*.f6456.1

        \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \left(-2 \cdot \color{blue}{\ell}\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    9. Applied rewrites56.1%

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

    if 5.00000000000000005e54 < (*.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 49.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. Taylor expanded in Om around inf

      \[\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)}} \]
    3. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(-4, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}, 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)} \]
      8. lower-*.f6442.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(t + t, U \cdot n, \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om} \cdot -4\right)} \]
    6. Applied rewrites49.8%

      \[\leadsto \sqrt{\mathsf{fma}\left(t + t, \color{blue}{U \cdot n}, \left(U \cdot \left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \ell\right)\right) \cdot -4\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 57.7% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \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)\\ t_2 := \sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{+28}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+305}:\\ \;\;\;\;\sqrt{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1
         (*
          (* (* 2.0 n) U)
          (-
           (- t (* 2.0 (/ (* l_m l_m) Om)))
           (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))
        (t_2
         (*
          (sqrt (fabs (* (+ U U) (+ (/ (* l_m (* -2.0 l_m)) Om) t))))
          (sqrt (fabs n)))))
   (if (<= t_1 2e+28)
     t_2
     (if (<= t_1 2e+305) (sqrt (fabs (* (* n (+ U U)) t))) t_2))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)));
	double t_2 = sqrt(fabs(((U + U) * (((l_m * (-2.0 * l_m)) / Om) + t)))) * sqrt(fabs(n));
	double tmp;
	if (t_1 <= 2e+28) {
		tmp = t_2;
	} else if (t_1 <= 2e+305) {
		tmp = sqrt(fabs(((n * (U + U)) * t)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
l_m =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(n, u, t, l_m, om, u_42)
use fmin_fmax_functions
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) - ((n * ((l_m / om) ** 2.0d0)) * (u - u_42)))
    t_2 = sqrt(abs(((u + u) * (((l_m * ((-2.0d0) * l_m)) / om) + t)))) * sqrt(abs(n))
    if (t_1 <= 2d+28) then
        tmp = t_2
    else if (t_1 <= 2d+305) then
        tmp = sqrt(abs(((n * (u + u)) * t)))
    else
        tmp = t_2
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * Math.pow((l_m / Om), 2.0)) * (U - U_42_)));
	double t_2 = Math.sqrt(Math.abs(((U + U) * (((l_m * (-2.0 * l_m)) / Om) + t)))) * Math.sqrt(Math.abs(n));
	double tmp;
	if (t_1 <= 2e+28) {
		tmp = t_2;
	} else if (t_1 <= 2e+305) {
		tmp = Math.sqrt(Math.abs(((n * (U + U)) * t)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * math.pow((l_m / Om), 2.0)) * (U - U_42_)))
	t_2 = math.sqrt(math.fabs(((U + U) * (((l_m * (-2.0 * l_m)) / Om) + t)))) * math.sqrt(math.fabs(n))
	tmp = 0
	if t_1 <= 2e+28:
		tmp = t_2
	elif t_1 <= 2e+305:
		tmp = math.sqrt(math.fabs(((n * (U + U)) * t)))
	else:
		tmp = t_2
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_))))
	t_2 = Float64(sqrt(abs(Float64(Float64(U + U) * Float64(Float64(Float64(l_m * Float64(-2.0 * l_m)) / Om) + t)))) * sqrt(abs(n)))
	tmp = 0.0
	if (t_1 <= 2e+28)
		tmp = t_2;
	elseif (t_1 <= 2e+305)
		tmp = sqrt(abs(Float64(Float64(n * Float64(U + U)) * t)));
	else
		tmp = t_2;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * ((l_m / Om) ^ 2.0)) * (U - U_42_)));
	t_2 = sqrt(abs(((U + U) * (((l_m * (-2.0 * l_m)) / Om) + t)))) * sqrt(abs(n));
	tmp = 0.0;
	if (t_1 <= 2e+28)
		tmp = t_2;
	elseif (t_1 <= 2e+305)
		tmp = sqrt(abs(((n * (U + U)) * t)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * 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 - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[Abs[N[(N[(U + U), $MachinePrecision] * N[(N[(N[(l$95$m * N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[n], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+28], t$95$2, If[LessEqual[t$95$1, 2e+305], N[Sqrt[N[Abs[N[(N[(n * N[(U + U), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], t$95$2]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \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)\\
t_2 := \sqrt{\left|\left(U + U\right) \cdot \left(\frac{l\_m \cdot \left(-2 \cdot l\_m\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+28}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+305}:\\
\;\;\;\;\sqrt{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 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*)))) < 1.99999999999999992e28 or 1.9999999999999999e305 < (*.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 49.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. Step-by-step derivation
      1. lift--.f64N/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(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 \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      3. fp-cancel-sub-sign-invN/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(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right) \cdot \left(U - U*\right)\right)}} \]
      4. +-commutativeN/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      6. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \color{blue}{\left(-2 \cdot \ell\right)}}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    8. Step-by-step derivation
      1. lower-*.f6456.1

        \[\leadsto \sqrt{\left|\left(U + U\right) \cdot \left(\frac{\ell \cdot \left(-2 \cdot \color{blue}{\ell}\right)}{Om} + t\right)\right|} \cdot \sqrt{\left|n\right|} \]
    9. Applied rewrites56.1%

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

    if 1.99999999999999992e28 < (*.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.9999999999999999e305

    1. Initial program 49.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. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t} \]
      7. associate-*l*N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      10. lower-*.f6434.9

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot t} \]
      14. associate-*l*N/A

        \[\leadsto \sqrt{\left(n \cdot \left(2 \cdot U\right)\right) \cdot t} \]
      15. count-2N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      16. lift-+.f64N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      17. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
      18. lower-*.f6434.9

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
    6. Applied rewrites34.9%

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot n} \]
      7. distribute-lft-inN/A

        \[\leadsto \sqrt{\left(t \cdot U + t \cdot U\right) \cdot n} \]
      8. distribute-rgt-inN/A

        \[\leadsto \sqrt{\left(U \cdot \left(t + t\right)\right) \cdot n} \]
      9. lift-+.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \left(t + t\right)\right) \cdot n} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + t\right) \cdot U\right) \cdot n} \]
      11. lift-*.f6434.6

        \[\leadsto \sqrt{\left(\left(t + t\right) \cdot U\right) \cdot n} \]
      12. rem-exp-logN/A

        \[\leadsto \sqrt{\color{blue}{e^{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}}} \]
      13. lift-log.f64N/A

        \[\leadsto \sqrt{e^{\color{blue}{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}}} \]
      14. exp-fabsN/A

        \[\leadsto \sqrt{\color{blue}{\left|e^{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}\right|}} \]
    8. Applied rewrites37.5%

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

Alternative 12: 41.2% accurate, 2.5× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 2.8 \cdot 10^{-8}:\\ \;\;\;\;\sqrt{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{-2 \cdot \left(U \cdot \left(2 \cdot \frac{n}{Om}\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 2.8e-8)
   (sqrt (fabs (* (* n (+ U U)) t)))
   (* l_m (sqrt (* -2.0 (* U (* 2.0 (/ n Om))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 2.8e-8) {
		tmp = sqrt(fabs(((n * (U + U)) * t)));
	} else {
		tmp = l_m * sqrt((-2.0 * (U * (2.0 * (n / Om)))));
	}
	return tmp;
}
l_m =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(n, u, t, l_m, om, u_42)
use fmin_fmax_functions
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (l_m <= 2.8d-8) then
        tmp = sqrt(abs(((n * (u + u)) * t)))
    else
        tmp = l_m * sqrt(((-2.0d0) * (u * (2.0d0 * (n / om)))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 2.8e-8) {
		tmp = Math.sqrt(Math.abs(((n * (U + U)) * t)));
	} else {
		tmp = l_m * Math.sqrt((-2.0 * (U * (2.0 * (n / Om)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 2.8e-8:
		tmp = math.sqrt(math.fabs(((n * (U + U)) * t)))
	else:
		tmp = l_m * math.sqrt((-2.0 * (U * (2.0 * (n / Om)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 2.8e-8)
		tmp = sqrt(abs(Float64(Float64(n * Float64(U + U)) * t)));
	else
		tmp = Float64(l_m * sqrt(Float64(-2.0 * Float64(U * Float64(2.0 * Float64(n / Om))))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (l_m <= 2.8e-8)
		tmp = sqrt(abs(((n * (U + U)) * t)));
	else
		tmp = l_m * sqrt((-2.0 * (U * (2.0 * (n / Om)))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 2.8e-8], N[Sqrt[N[Abs[N[(N[(n * N[(U + U), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(-2.0 * N[(U * N[(2.0 * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2.8 \cdot 10^{-8}:\\
\;\;\;\;\sqrt{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.7999999999999999e-8

    1. Initial program 49.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. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t} \]
      7. associate-*l*N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      10. lower-*.f6434.9

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot t} \]
      14. associate-*l*N/A

        \[\leadsto \sqrt{\left(n \cdot \left(2 \cdot U\right)\right) \cdot t} \]
      15. count-2N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      16. lift-+.f64N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      17. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
      18. lower-*.f6434.9

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
    6. Applied rewrites34.9%

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

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

        \[\leadsto \sqrt{t \cdot \color{blue}{\left(\left(U + U\right) \cdot n\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{t \cdot \left(\left(U + U\right) \cdot \color{blue}{n}\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot \color{blue}{n}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot \color{blue}{n}} \]
      6. lift-+.f64N/A

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot n} \]
      7. distribute-lft-inN/A

        \[\leadsto \sqrt{\left(t \cdot U + t \cdot U\right) \cdot n} \]
      8. distribute-rgt-inN/A

        \[\leadsto \sqrt{\left(U \cdot \left(t + t\right)\right) \cdot n} \]
      9. lift-+.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \left(t + t\right)\right) \cdot n} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + t\right) \cdot U\right) \cdot n} \]
      11. lift-*.f6434.6

        \[\leadsto \sqrt{\left(\left(t + t\right) \cdot U\right) \cdot n} \]
      12. rem-exp-logN/A

        \[\leadsto \sqrt{\color{blue}{e^{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}}} \]
      13. lift-log.f64N/A

        \[\leadsto \sqrt{e^{\color{blue}{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}}} \]
      14. exp-fabsN/A

        \[\leadsto \sqrt{\color{blue}{\left|e^{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}\right|}} \]
    8. Applied rewrites37.5%

      \[\leadsto \sqrt{\color{blue}{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}} \]

    if 2.7999999999999999e-8 < l

    1. Initial program 49.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. Taylor expanded in l around inf

      \[\leadsto \color{blue}{\ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \ell \cdot \color{blue}{\sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      6. lower-fma.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      8. lower-/.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      10. lower--.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      11. lower-pow.f6428.5

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
    4. Applied rewrites28.5%

      \[\leadsto \color{blue}{\ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)}} \]
    5. Taylor expanded in n around 0

      \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(2 \cdot \frac{n}{Om}\right)\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(2 \cdot \frac{n}{Om}\right)\right)} \]
      2. lower-/.f6418.0

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(2 \cdot \frac{n}{Om}\right)\right)} \]
    7. Applied rewrites18.0%

      \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(2 \cdot \frac{n}{Om}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 41.0% accurate, 2.9× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 2.8 \cdot 10^{-8}:\\ \;\;\;\;\sqrt{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{-4 \cdot \frac{U \cdot n}{Om}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 2.8e-8)
   (sqrt (fabs (* (* n (+ U U)) t)))
   (* l_m (sqrt (* -4.0 (/ (* U n) Om))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 2.8e-8) {
		tmp = sqrt(fabs(((n * (U + U)) * t)));
	} else {
		tmp = l_m * sqrt((-4.0 * ((U * n) / Om)));
	}
	return tmp;
}
l_m =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(n, u, t, l_m, om, u_42)
use fmin_fmax_functions
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (l_m <= 2.8d-8) then
        tmp = sqrt(abs(((n * (u + u)) * t)))
    else
        tmp = l_m * sqrt(((-4.0d0) * ((u * n) / om)))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 2.8e-8) {
		tmp = Math.sqrt(Math.abs(((n * (U + U)) * t)));
	} else {
		tmp = l_m * Math.sqrt((-4.0 * ((U * n) / Om)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 2.8e-8:
		tmp = math.sqrt(math.fabs(((n * (U + U)) * t)))
	else:
		tmp = l_m * math.sqrt((-4.0 * ((U * n) / Om)))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 2.8e-8)
		tmp = sqrt(abs(Float64(Float64(n * Float64(U + U)) * t)));
	else
		tmp = Float64(l_m * sqrt(Float64(-4.0 * Float64(Float64(U * n) / Om))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (l_m <= 2.8e-8)
		tmp = sqrt(abs(((n * (U + U)) * t)));
	else
		tmp = l_m * sqrt((-4.0 * ((U * n) / Om)));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 2.8e-8], N[Sqrt[N[Abs[N[(N[(n * N[(U + U), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(-4.0 * N[(N[(U * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2.8 \cdot 10^{-8}:\\
\;\;\;\;\sqrt{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}\\

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \sqrt{-4 \cdot \frac{U \cdot n}{Om}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.7999999999999999e-8

    1. Initial program 49.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. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. lower-*.f6435.2

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites35.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \left(\left(U \cdot n\right) \cdot \color{blue}{t}\right)} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\left(2 \cdot \left(U \cdot n\right)\right) \cdot \color{blue}{t}} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t} \]
      7. associate-*l*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      8. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      9. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      10. lower-*.f6434.9

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{t}} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      12. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot t} \]
      14. associate-*l*N/A

        \[\leadsto \sqrt{\left(n \cdot \left(2 \cdot U\right)\right) \cdot t} \]
      15. count-2N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      16. lift-+.f64N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      17. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
      18. lower-*.f6434.9

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
    6. Applied rewrites34.9%

      \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot \color{blue}{t}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot \color{blue}{t}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{t \cdot \color{blue}{\left(\left(U + U\right) \cdot n\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{t \cdot \left(\left(U + U\right) \cdot \color{blue}{n}\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot \color{blue}{n}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot \color{blue}{n}} \]
      6. lift-+.f64N/A

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot n} \]
      7. distribute-lft-inN/A

        \[\leadsto \sqrt{\left(t \cdot U + t \cdot U\right) \cdot n} \]
      8. distribute-rgt-inN/A

        \[\leadsto \sqrt{\left(U \cdot \left(t + t\right)\right) \cdot n} \]
      9. lift-+.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \left(t + t\right)\right) \cdot n} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + t\right) \cdot U\right) \cdot n} \]
      11. lift-*.f6434.6

        \[\leadsto \sqrt{\left(\left(t + t\right) \cdot U\right) \cdot n} \]
      12. rem-exp-logN/A

        \[\leadsto \sqrt{\color{blue}{e^{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}}} \]
      13. lift-log.f64N/A

        \[\leadsto \sqrt{e^{\color{blue}{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}}} \]
      14. exp-fabsN/A

        \[\leadsto \sqrt{\color{blue}{\left|e^{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}\right|}} \]
    8. Applied rewrites37.5%

      \[\leadsto \sqrt{\color{blue}{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}} \]

    if 2.7999999999999999e-8 < l

    1. Initial program 49.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. Taylor expanded in l around inf

      \[\leadsto \color{blue}{\ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \ell \cdot \color{blue}{\sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      6. lower-fma.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      8. lower-/.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      10. lower--.f64N/A

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
      11. lower-pow.f6428.5

        \[\leadsto \ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} \]
    4. Applied rewrites28.5%

      \[\leadsto \color{blue}{\ell \cdot \sqrt{-2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(2, \frac{1}{Om}, \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)}} \]
    5. Taylor expanded in n around 0

      \[\leadsto \ell \cdot \sqrt{-4 \cdot \frac{U \cdot n}{Om}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \ell \cdot \sqrt{-4 \cdot \frac{U \cdot n}{Om}} \]
      2. lower-/.f64N/A

        \[\leadsto \ell \cdot \sqrt{-4 \cdot \frac{U \cdot n}{Om}} \]
      3. lower-*.f6418.0

        \[\leadsto \ell \cdot \sqrt{-4 \cdot \frac{U \cdot n}{Om}} \]
    7. Applied rewrites18.0%

      \[\leadsto \ell \cdot \sqrt{-4 \cdot \frac{U \cdot n}{Om}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 40.0% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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)} \leq 5 \cdot 10^{-127}:\\ \;\;\;\;\sqrt{\left(U + U\right) \cdot \left(t \cdot n\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<=
      (sqrt
       (*
        (* (* 2.0 n) U)
        (-
         (- t (* 2.0 (/ (* l_m l_m) Om)))
         (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))
      5e-127)
   (sqrt (* (+ U U) (* t n)))
   (sqrt (fabs (* (* n (+ U U)) t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 5e-127) {
		tmp = sqrt(((U + U) * (t * n)));
	} else {
		tmp = sqrt(fabs(((n * (U + U)) * t)));
	}
	return tmp;
}
l_m =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(n, u, t, l_m, om, u_42)
use fmin_fmax_functions
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) - ((n * ((l_m / om) ** 2.0d0)) * (u - u_42))))) <= 5d-127) then
        tmp = sqrt(((u + u) * (t * n)))
    else
        tmp = sqrt(abs(((n * (u + u)) * t)))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * Math.pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 5e-127) {
		tmp = Math.sqrt(((U + U) * (t * n)));
	} else {
		tmp = Math.sqrt(Math.abs(((n * (U + U)) * t)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * math.pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 5e-127:
		tmp = math.sqrt(((U + U) * (t * n)))
	else:
		tmp = math.sqrt(math.fabs(((n * (U + U)) * t)))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_))))) <= 5e-127)
		tmp = sqrt(Float64(Float64(U + U) * Float64(t * n)));
	else
		tmp = sqrt(abs(Float64(Float64(n * Float64(U + U)) * t)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * ((l_m / Om) ^ 2.0)) * (U - U_42_))))) <= 5e-127)
		tmp = sqrt(((U + U) * (t * n)));
	else
		tmp = sqrt(abs(((n * (U + U)) * t)));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * 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 - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 5e-127], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(t * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(n * N[(U + U), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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)} \leq 5 \cdot 10^{-127}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(t \cdot n\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 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.9999999999999997e-127

    1. Initial program 49.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. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. lower-*.f6435.2

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites35.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      4. count-2N/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(\color{blue}{n} \cdot t\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(\color{blue}{n} \cdot t\right)} \]
      6. lower-*.f6435.2

        \[\leadsto \sqrt{\left(U + U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      7. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(n \cdot \color{blue}{t}\right)} \]
      8. *-commutativeN/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(t \cdot \color{blue}{n}\right)} \]
      9. lower-*.f6435.2

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(t \cdot \color{blue}{n}\right)} \]
    6. Applied rewrites35.2%

      \[\leadsto \sqrt{\left(U + U\right) \cdot \color{blue}{\left(t \cdot n\right)}} \]

    if 4.9999999999999997e-127 < (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 49.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. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. lower-*.f6435.2

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites35.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \left(\left(U \cdot n\right) \cdot \color{blue}{t}\right)} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\left(2 \cdot \left(U \cdot n\right)\right) \cdot \color{blue}{t}} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t} \]
      7. associate-*l*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      8. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      9. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      10. lower-*.f6434.9

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{t}} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      12. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot t} \]
      14. associate-*l*N/A

        \[\leadsto \sqrt{\left(n \cdot \left(2 \cdot U\right)\right) \cdot t} \]
      15. count-2N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      16. lift-+.f64N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      17. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
      18. lower-*.f6434.9

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
    6. Applied rewrites34.9%

      \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot \color{blue}{t}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot \color{blue}{t}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{t \cdot \color{blue}{\left(\left(U + U\right) \cdot n\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{t \cdot \left(\left(U + U\right) \cdot \color{blue}{n}\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot \color{blue}{n}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot \color{blue}{n}} \]
      6. lift-+.f64N/A

        \[\leadsto \sqrt{\left(t \cdot \left(U + U\right)\right) \cdot n} \]
      7. distribute-lft-inN/A

        \[\leadsto \sqrt{\left(t \cdot U + t \cdot U\right) \cdot n} \]
      8. distribute-rgt-inN/A

        \[\leadsto \sqrt{\left(U \cdot \left(t + t\right)\right) \cdot n} \]
      9. lift-+.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \left(t + t\right)\right) \cdot n} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + t\right) \cdot U\right) \cdot n} \]
      11. lift-*.f6434.6

        \[\leadsto \sqrt{\left(\left(t + t\right) \cdot U\right) \cdot n} \]
      12. rem-exp-logN/A

        \[\leadsto \sqrt{\color{blue}{e^{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}}} \]
      13. lift-log.f64N/A

        \[\leadsto \sqrt{e^{\color{blue}{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}}} \]
      14. exp-fabsN/A

        \[\leadsto \sqrt{\color{blue}{\left|e^{\log \left(\left(\left(t + t\right) \cdot U\right) \cdot n\right)}\right|}} \]
    8. Applied rewrites37.5%

      \[\leadsto \sqrt{\color{blue}{\left|\left(n \cdot \left(U + U\right)\right) \cdot t\right|}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 37.7% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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)} \leq 5 \cdot 10^{-127}:\\ \;\;\;\;\sqrt{\left(U + U\right) \cdot \left(t \cdot n\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<=
      (sqrt
       (*
        (* (* 2.0 n) U)
        (-
         (- t (* 2.0 (/ (* l_m l_m) Om)))
         (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))
      5e-127)
   (sqrt (* (+ U U) (* t n)))
   (sqrt (* (* U n) (+ t t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 5e-127) {
		tmp = sqrt(((U + U) * (t * n)));
	} else {
		tmp = sqrt(((U * n) * (t + t)));
	}
	return tmp;
}
l_m =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(n, u, t, l_m, om, u_42)
use fmin_fmax_functions
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) - ((n * ((l_m / om) ** 2.0d0)) * (u - u_42))))) <= 5d-127) then
        tmp = sqrt(((u + u) * (t * n)))
    else
        tmp = sqrt(((u * n) * (t + t)))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * Math.pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 5e-127) {
		tmp = Math.sqrt(((U + U) * (t * n)));
	} else {
		tmp = Math.sqrt(((U * n) * (t + t)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * math.pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 5e-127:
		tmp = math.sqrt(((U + U) * (t * n)))
	else:
		tmp = math.sqrt(((U * n) * (t + t)))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_))))) <= 5e-127)
		tmp = sqrt(Float64(Float64(U + U) * Float64(t * n)));
	else
		tmp = sqrt(Float64(Float64(U * n) * Float64(t + t)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * ((l_m / Om) ^ 2.0)) * (U - U_42_))))) <= 5e-127)
		tmp = sqrt(((U + U) * (t * n)));
	else
		tmp = sqrt(((U * n) * (t + t)));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * 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 - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 5e-127], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(t * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(t + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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)} \leq 5 \cdot 10^{-127}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(t \cdot n\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 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.9999999999999997e-127

    1. Initial program 49.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. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. lower-*.f6435.2

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites35.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      4. count-2N/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(\color{blue}{n} \cdot t\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(\color{blue}{n} \cdot t\right)} \]
      6. lower-*.f6435.2

        \[\leadsto \sqrt{\left(U + U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      7. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(n \cdot \color{blue}{t}\right)} \]
      8. *-commutativeN/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(t \cdot \color{blue}{n}\right)} \]
      9. lower-*.f6435.2

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(t \cdot \color{blue}{n}\right)} \]
    6. Applied rewrites35.2%

      \[\leadsto \sqrt{\left(U + U\right) \cdot \color{blue}{\left(t \cdot n\right)}} \]

    if 4.9999999999999997e-127 < (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 49.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. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. lower-*.f6435.2

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites35.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. count-2-revN/A

        \[\leadsto \sqrt{U \cdot \left(n \cdot t\right) + \color{blue}{U \cdot \left(n \cdot t\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{U \cdot \left(n \cdot t\right) + \color{blue}{U} \cdot \left(n \cdot t\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{U \cdot \left(n \cdot t\right) + U \cdot \left(n \cdot t\right)} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot t + \color{blue}{U} \cdot \left(n \cdot t\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot t + U \cdot \color{blue}{\left(n \cdot t\right)}} \]
      7. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot t + U \cdot \left(n \cdot \color{blue}{t}\right)} \]
      8. associate-*r*N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot t + \left(U \cdot n\right) \cdot \color{blue}{t}} \]
      9. distribute-lft-outN/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t + t\right)}} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{t} + t\right)} \]
      11. lower-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(t + t\right)}} \]
      12. *-commutativeN/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\color{blue}{t} + t\right)} \]
      13. lower-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\color{blue}{t} + t\right)} \]
      14. lower-+.f6434.9

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(t + \color{blue}{t}\right)} \]
    6. Applied rewrites34.9%

      \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t + t\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 37.4% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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)} \leq 0:\\ \;\;\;\;\sqrt{\left(\left(U + U\right) \cdot t\right) \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<=
      (sqrt
       (*
        (* (* 2.0 n) U)
        (-
         (- t (* 2.0 (/ (* l_m l_m) Om)))
         (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))
      0.0)
   (sqrt (* (* (+ U U) t) n))
   (sqrt (* (* (+ U U) n) t))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 0.0) {
		tmp = sqrt((((U + U) * t) * n));
	} else {
		tmp = sqrt((((U + U) * n) * t));
	}
	return tmp;
}
l_m =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(n, u, t, l_m, om, u_42)
use fmin_fmax_functions
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) - ((n * ((l_m / om) ** 2.0d0)) * (u - u_42))))) <= 0.0d0) then
        tmp = sqrt((((u + u) * t) * n))
    else
        tmp = sqrt((((u + u) * n) * t))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * Math.pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 0.0) {
		tmp = Math.sqrt((((U + U) * t) * n));
	} else {
		tmp = Math.sqrt((((U + U) * n) * t));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * math.pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 0.0:
		tmp = math.sqrt((((U + U) * t) * n))
	else:
		tmp = math.sqrt((((U + U) * n) * t))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_))))) <= 0.0)
		tmp = sqrt(Float64(Float64(Float64(U + U) * t) * n));
	else
		tmp = sqrt(Float64(Float64(Float64(U + U) * n) * t));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * ((l_m / Om) ^ 2.0)) * (U - U_42_))))) <= 0.0)
		tmp = sqrt((((U + U) * t) * n));
	else
		tmp = sqrt((((U + U) * n) * t));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * 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 - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 0.0], N[Sqrt[N[(N[(N[(U + U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U + U), $MachinePrecision] * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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)} \leq 0:\\
\;\;\;\;\sqrt{\left(\left(U + U\right) \cdot t\right) \cdot n}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 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 49.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. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. lower-*.f6435.2

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites35.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      4. count-2N/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(\color{blue}{n} \cdot t\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(\color{blue}{n} \cdot t\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(n \cdot \color{blue}{t}\right)} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot \left(t \cdot \color{blue}{n}\right)} \]
      8. associate-*r*N/A

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot t\right) \cdot \color{blue}{n}} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot t\right) \cdot \color{blue}{n}} \]
      10. lower-*.f6434.6

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot t\right) \cdot n} \]
    6. Applied rewrites34.6%

      \[\leadsto \color{blue}{\sqrt{\left(\left(U + U\right) \cdot t\right) \cdot n}} \]

    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*)))))

    1. Initial program 49.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. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. lower-*.f6435.2

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites35.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \left(\left(U \cdot n\right) \cdot \color{blue}{t}\right)} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\left(2 \cdot \left(U \cdot n\right)\right) \cdot \color{blue}{t}} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t} \]
      7. associate-*l*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      8. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      9. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      10. lower-*.f6434.9

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{t}} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      12. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot t} \]
      14. associate-*l*N/A

        \[\leadsto \sqrt{\left(n \cdot \left(2 \cdot U\right)\right) \cdot t} \]
      15. count-2N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      16. lift-+.f64N/A

        \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
      17. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
      18. lower-*.f6434.9

        \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
    6. Applied rewrites34.9%

      \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot \color{blue}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 34.9% accurate, 4.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* (* (+ U U) n) t)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return sqrt((((U + U) * n) * t));
}
l_m =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(n, u, t, l_m, om, u_42)
use fmin_fmax_functions
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = sqrt((((u + u) * n) * t))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return Math.sqrt((((U + U) * n) * t));
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.sqrt((((U + U) * n) * t))
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return sqrt(Float64(Float64(Float64(U + U) * n) * t))
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = sqrt((((U + U) * n) * t));
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(U + U), $MachinePrecision] * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t}
\end{array}
Derivation
  1. Initial program 49.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. Taylor expanded in t around inf

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
  3. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    2. lower-*.f64N/A

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
    3. lower-*.f6435.2

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
  4. Applied rewrites35.2%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
  5. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    2. lift-*.f64N/A

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
    3. lift-*.f64N/A

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. associate-*r*N/A

      \[\leadsto \sqrt{2 \cdot \left(\left(U \cdot n\right) \cdot \color{blue}{t}\right)} \]
    5. associate-*r*N/A

      \[\leadsto \sqrt{\left(2 \cdot \left(U \cdot n\right)\right) \cdot \color{blue}{t}} \]
    6. *-commutativeN/A

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t} \]
    7. associate-*l*N/A

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
    8. lift-*.f64N/A

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
    9. lift-*.f64N/A

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
    10. lower-*.f6434.9

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{t}} \]
    11. lift-*.f64N/A

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
    12. lift-*.f64N/A

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \]
    13. *-commutativeN/A

      \[\leadsto \sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot t} \]
    14. associate-*l*N/A

      \[\leadsto \sqrt{\left(n \cdot \left(2 \cdot U\right)\right) \cdot t} \]
    15. count-2N/A

      \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
    16. lift-+.f64N/A

      \[\leadsto \sqrt{\left(n \cdot \left(U + U\right)\right) \cdot t} \]
    17. *-commutativeN/A

      \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
    18. lower-*.f6434.9

      \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t} \]
  6. Applied rewrites34.9%

    \[\leadsto \sqrt{\left(\left(U + U\right) \cdot n\right) \cdot \color{blue}{t}} \]
  7. Add Preprocessing

Alternative 18: 34.9% accurate, 4.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* (* U n) (+ t t))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return sqrt(((U * n) * (t + t)));
}
l_m =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(n, u, t, l_m, om, u_42)
use fmin_fmax_functions
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = sqrt(((u * n) * (t + t)))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return Math.sqrt(((U * n) * (t + t)));
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.sqrt(((U * n) * (t + t)))
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return sqrt(Float64(Float64(U * n) * Float64(t + t)))
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = sqrt(((U * n) * (t + t)));
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(t + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}
\end{array}
Derivation
  1. Initial program 49.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. Taylor expanded in t around inf

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
  3. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    2. lower-*.f64N/A

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot t\right)}\right)} \]
    3. lower-*.f6435.2

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
  4. Applied rewrites35.2%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
  5. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    2. count-2-revN/A

      \[\leadsto \sqrt{U \cdot \left(n \cdot t\right) + \color{blue}{U \cdot \left(n \cdot t\right)}} \]
    3. lift-*.f64N/A

      \[\leadsto \sqrt{U \cdot \left(n \cdot t\right) + \color{blue}{U} \cdot \left(n \cdot t\right)} \]
    4. lift-*.f64N/A

      \[\leadsto \sqrt{U \cdot \left(n \cdot t\right) + U \cdot \left(n \cdot t\right)} \]
    5. associate-*r*N/A

      \[\leadsto \sqrt{\left(U \cdot n\right) \cdot t + \color{blue}{U} \cdot \left(n \cdot t\right)} \]
    6. lift-*.f64N/A

      \[\leadsto \sqrt{\left(U \cdot n\right) \cdot t + U \cdot \color{blue}{\left(n \cdot t\right)}} \]
    7. lift-*.f64N/A

      \[\leadsto \sqrt{\left(U \cdot n\right) \cdot t + U \cdot \left(n \cdot \color{blue}{t}\right)} \]
    8. associate-*r*N/A

      \[\leadsto \sqrt{\left(U \cdot n\right) \cdot t + \left(U \cdot n\right) \cdot \color{blue}{t}} \]
    9. distribute-lft-outN/A

      \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t + t\right)}} \]
    10. *-commutativeN/A

      \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{t} + t\right)} \]
    11. lower-*.f64N/A

      \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(t + t\right)}} \]
    12. *-commutativeN/A

      \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\color{blue}{t} + t\right)} \]
    13. lower-*.f64N/A

      \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\color{blue}{t} + t\right)} \]
    14. lower-+.f6434.9

      \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(t + \color{blue}{t}\right)} \]
  6. Applied rewrites34.9%

    \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t + t\right)}} \]
  7. Add Preprocessing

Reproduce

?
herbie shell --seed 2025162 
(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*))))))