Toniolo and Linder, Equation (13)

Percentage Accurate: 50.3% → 65.2%
Time: 11.1s
Alternatives: 20
Speedup: 0.7×

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 20 alternatives:

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

Initial Program: 50.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: 65.2% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;l\_m \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)}\\


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

    1. Initial program 50.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 n around 0

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
      7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 50.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 \left(\color{blue}{\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)} - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) - \color{blue}{\left(\frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot n\right)\right)} \cdot \left(U - U*\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 50.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.f6427.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 rewrites27.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)}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 2: 62.8% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 50.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 n around 0

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
      7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 50.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 \left(\color{blue}{\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)} - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
      7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 62.6% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 50.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 n around 0

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
      7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 50.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 \left(\color{blue}{\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)} - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
      7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.5% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 50.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 n around 0

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
      7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 50.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 \left(\color{blue}{\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)} - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 58.5% accurate, 0.6× 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(U + U\right) \cdot \mathsf{fma}\left(t, n, \frac{\left(\left(l\_m \cdot l\_m\right) \cdot n\right) \cdot -2}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(n \cdot \left(U* - U\right), \frac{l\_m}{Om}, -2 \cdot l\_m\right), t\right) \cdot \left(U \cdot \left(n + n\right)\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*)))))
          0.0)
       (sqrt (* (+ U U) (fma t n (/ (* (* (* l_m l_m) n) -2.0) Om))))
       (sqrt
        (*
         (fma (/ l_m Om) (fma (* n (- U* U)) (/ l_m Om) (* -2.0 l_m)) t)
         (* U (+ n n))))))
    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) * fma(t, n, ((((l_m * l_m) * n) * -2.0) / Om))));
    	} else {
    		tmp = sqrt((fma((l_m / Om), fma((n * (U_42_ - U)), (l_m / Om), (-2.0 * l_m)), t) * (U * (n + n))));
    	}
    	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(U + U) * fma(t, n, Float64(Float64(Float64(Float64(l_m * l_m) * n) * -2.0) / Om))));
    	else
    		tmp = sqrt(Float64(fma(Float64(l_m / Om), fma(Float64(n * Float64(U_42_ - U)), Float64(l_m / Om), Float64(-2.0 * l_m)), t) * Float64(U * Float64(n + n))));
    	end
    	return 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[(U + U), $MachinePrecision] * N[(t * n + N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * n), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(U * N[(n + n), $MachinePrecision]), $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 0:\\
    \;\;\;\;\sqrt{\left(U + U\right) \cdot \mathsf{fma}\left(t, n, \frac{\left(\left(l\_m \cdot l\_m\right) \cdot n\right) \cdot -2}{Om}\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(n \cdot \left(U* - U\right), \frac{l\_m}{Om}, -2 \cdot l\_m\right), t\right) \cdot \left(U \cdot \left(n + n\right)\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*))))) < 0.0

      1. Initial program 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 50.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 \left(\color{blue}{\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)} - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
        2. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 55.5% accurate, 0.4× speedup?

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

      1. Initial program 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

        \[\leadsto \sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot 2\right) \cdot \color{blue}{\left(U \cdot 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 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 55.2% accurate, 0.4× speedup?

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

      1. Initial program 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

        \[\leadsto \sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot 2\right) \cdot \color{blue}{\left(U \cdot 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 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
        5. lower-pow.f6413.7

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
      7. Applied rewrites13.7%

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

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

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

          \[\leadsto \sqrt{\sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \cdot \color{blue}{\sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}}} \]
      9. Applied rewrites19.8%

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

    Alternative 8: 52.2% accurate, 0.7× 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:\\ \;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(\frac{l\_m}{Om} \cdot l\_m, -2, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\frac{\left(\left(l\_m \cdot l\_m\right) \cdot n\right) \cdot U}{Om} \cdot -4\right|}\\ \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 (* (* (* (fma (* (/ l_m Om) l_m) -2.0 t) n) U) 2.0))
       (sqrt (fabs (* (/ (* (* (* l_m l_m) n) U) Om) -4.0)))))
    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((((fma(((l_m / Om) * l_m), -2.0, t) * n) * U) * 2.0));
    	} else {
    		tmp = sqrt(fabs((((((l_m * l_m) * n) * U) / Om) * -4.0)));
    	}
    	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 = sqrt(Float64(Float64(Float64(fma(Float64(Float64(l_m / Om) * l_m), -2.0, t) * n) * U) * 2.0));
    	else
    		tmp = sqrt(abs(Float64(Float64(Float64(Float64(Float64(l_m * l_m) * n) * U) / Om) * -4.0)));
    	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[Sqrt[N[(N[(N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * l$95$m), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0), $MachinePrecision]], $MachinePrecision]], $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:\\
    \;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(\frac{l\_m}{Om} \cdot l\_m, -2, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{\left|\frac{\left(\left(l\_m \cdot l\_m\right) \cdot n\right) \cdot U}{Om} \cdot -4\right|}\\
    
    
    \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 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

      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 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
        5. lower-pow.f6413.7

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
      7. Applied rewrites13.7%

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

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

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

          \[\leadsto \sqrt{\sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \cdot \color{blue}{\sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}}} \]
      9. Applied rewrites19.8%

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

    Alternative 9: 46.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)\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{-322}:\\ \;\;\;\;t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+306}:\\ \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\mathsf{fma}\left(-2 \cdot \frac{l\_m}{Om}, l\_m, t\right) \cdot \left(n + 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
             (*
              (* (* 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-322)
         (* t (sqrt (* 2.0 (/ (* U n) t))))
         (if (<= t_1 4e+306)
           (sqrt (* (* U n) (+ t t)))
           (sqrt (fabs (* (fma (* -2.0 (/ l_m Om)) l_m t) (+ n n))))))))
    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 tmp;
    	if (t_1 <= 2e-322) {
    		tmp = t * sqrt((2.0 * ((U * n) / t)));
    	} else if (t_1 <= 4e+306) {
    		tmp = sqrt(((U * n) * (t + t)));
    	} else {
    		tmp = sqrt(fabs((fma((-2.0 * (l_m / Om)), l_m, t) * (n + n))));
    	}
    	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_))))
    	tmp = 0.0
    	if (t_1 <= 2e-322)
    		tmp = Float64(t * sqrt(Float64(2.0 * Float64(Float64(U * n) / t))));
    	elseif (t_1 <= 4e+306)
    		tmp = sqrt(Float64(Float64(U * n) * Float64(t + t)));
    	else
    		tmp = sqrt(abs(Float64(fma(Float64(-2.0 * Float64(l_m / Om)), l_m, t) * Float64(n + 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[(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]}, If[LessEqual[t$95$1, 2e-322], N[(t * N[Sqrt[N[(2.0 * N[(N[(U * n), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+306], N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(t + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(N[(-2.0 * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * l$95$m + t), $MachinePrecision] * N[(n + n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $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)\\
    \mathbf{if}\;t\_1 \leq 2 \cdot 10^{-322}:\\
    \;\;\;\;t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}}\\
    
    \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+306}:\\
    \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{\left|\mathsf{fma}\left(-2 \cdot \frac{l\_m}{Om}, l\_m, t\right) \cdot \left(n + n\right)\right|}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 1.97626e-322

      1. Initial program 50.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 \color{blue}{t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto t \cdot \color{blue}{\sqrt{2 \cdot \frac{U \cdot n}{t}}} \]
        2. lower-sqrt.f64N/A

          \[\leadsto t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}} \]
        3. lower-*.f64N/A

          \[\leadsto t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}} \]
        4. lower-/.f64N/A

          \[\leadsto t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}} \]
        5. lower-*.f6418.5

          \[\leadsto t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}} \]
      4. Applied rewrites18.5%

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

      if 1.97626e-322 < (*.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.00000000000000007e306

      1. Initial program 50.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-*.f6436.1

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. Applied rewrites36.1%

        \[\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-+.f6436.1

          \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(t + \color{blue}{t}\right)} \]
      6. Applied rewrites36.1%

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t + t\right)}} \]

      if 4.00000000000000007e306 < (*.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 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{1 \cdot 1 - 1}{U - U}} \]
        12. metadata-evalN/A

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - 1}{U - U}} \]
        14. metadata-evalN/A

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - 1 \cdot 1}{U - U}} \]
        15. metadata-evalN/A

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot 1}{U - U}} \]
        16. metadata-evalN/A

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{0}} \]
        18. metadata-evalN/A

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{1 \cdot 1 - 1}} \]
        20. metadata-evalN/A

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} \cdot 1 - 1}} \]
        21. metadata-evalN/A

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} \cdot \frac{2}{2} - 1}} \]
        22. metadata-evalN/A

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot 1}} \]
        24. metadata-evalN/A

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{\color{blue}{2}}}} \]
        25. metadata-evalN/A

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

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

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} - \color{blue}{\frac{2}{2}} \cdot \frac{2}{2}}} \]
        29. metadata-evalN/A

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} - 1 \cdot 1}} \]
      6. Applied rewrites9.7%

        \[\leadsto \sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot n\right) \cdot \color{blue}{2}} \]
      7. Step-by-step derivation
        1. rem-square-sqrtN/A

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

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

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

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

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

    Alternative 10: 45.0% accurate, 2.3× speedup?

    \[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 1.35 \cdot 10^{+70}:\\ \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\frac{\left(\left(l\_m \cdot l\_m\right) \cdot n\right) \cdot U}{Om} \cdot -4\right|}\\ \end{array} \end{array} \]
    l_m = (fabs.f64 l)
    (FPCore (n U t l_m Om U*)
     :precision binary64
     (if (<= l_m 1.35e+70)
       (sqrt (* (* U n) (+ t t)))
       (sqrt (fabs (* (/ (* (* (* l_m l_m) n) U) Om) -4.0)))))
    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 <= 1.35e+70) {
    		tmp = sqrt(((U * n) * (t + t)));
    	} else {
    		tmp = sqrt(fabs((((((l_m * l_m) * n) * U) / Om) * -4.0)));
    	}
    	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 <= 1.35d+70) then
            tmp = sqrt(((u * n) * (t + t)))
        else
            tmp = sqrt(abs((((((l_m * l_m) * n) * u) / om) * (-4.0d0))))
        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 <= 1.35e+70) {
    		tmp = Math.sqrt(((U * n) * (t + t)));
    	} else {
    		tmp = Math.sqrt(Math.abs((((((l_m * l_m) * n) * U) / Om) * -4.0)));
    	}
    	return tmp;
    }
    
    l_m = math.fabs(l)
    def code(n, U, t, l_m, Om, U_42_):
    	tmp = 0
    	if l_m <= 1.35e+70:
    		tmp = math.sqrt(((U * n) * (t + t)))
    	else:
    		tmp = math.sqrt(math.fabs((((((l_m * l_m) * n) * U) / Om) * -4.0)))
    	return tmp
    
    l_m = abs(l)
    function code(n, U, t, l_m, Om, U_42_)
    	tmp = 0.0
    	if (l_m <= 1.35e+70)
    		tmp = sqrt(Float64(Float64(U * n) * Float64(t + t)));
    	else
    		tmp = sqrt(abs(Float64(Float64(Float64(Float64(Float64(l_m * l_m) * n) * U) / Om) * -4.0)));
    	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 <= 1.35e+70)
    		tmp = sqrt(((U * n) * (t + t)));
    	else
    		tmp = sqrt(abs((((((l_m * l_m) * n) * U) / Om) * -4.0)));
    	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, 1.35e+70], N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(t + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    l_m = \left|\ell\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;l\_m \leq 1.35 \cdot 10^{+70}:\\
    \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{\left|\frac{\left(\left(l\_m \cdot l\_m\right) \cdot n\right) \cdot U}{Om} \cdot -4\right|}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if l < 1.35e70

      1. Initial program 50.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-*.f6436.1

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. Applied rewrites36.1%

        \[\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-+.f6436.1

          \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(t + \color{blue}{t}\right)} \]
      6. Applied rewrites36.1%

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t + t\right)}} \]

      if 1.35e70 < l

      1. Initial program 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
        5. lower-pow.f6413.7

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
      7. Applied rewrites13.7%

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

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

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

          \[\leadsto \sqrt{\sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \cdot \color{blue}{\sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}}} \]
      9. Applied rewrites19.8%

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

    Alternative 11: 44.4% accurate, 2.1× speedup?

    \[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{l\_m}{Om} \cdot l\_m\\ \mathbf{if}\;l\_m \leq 5.3 \cdot 10^{+79}:\\ \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\ \mathbf{elif}\;l\_m \leq 2.8 \cdot 10^{+183}:\\ \;\;\;\;\sqrt{\left(-4 \cdot U\right) \cdot \left(n \cdot t\_1\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\mathsf{fma}\left(t\_1, -2, t\right) \cdot 2\right|}\\ \end{array} \end{array} \]
    l_m = (fabs.f64 l)
    (FPCore (n U t l_m Om U*)
     :precision binary64
     (let* ((t_1 (* (/ l_m Om) l_m)))
       (if (<= l_m 5.3e+79)
         (sqrt (* (* U n) (+ t t)))
         (if (<= l_m 2.8e+183)
           (sqrt (* (* -4.0 U) (* n t_1)))
           (sqrt (fabs (* (fma t_1 -2.0 t) 2.0)))))))
    l_m = fabs(l);
    double code(double n, double U, double t, double l_m, double Om, double U_42_) {
    	double t_1 = (l_m / Om) * l_m;
    	double tmp;
    	if (l_m <= 5.3e+79) {
    		tmp = sqrt(((U * n) * (t + t)));
    	} else if (l_m <= 2.8e+183) {
    		tmp = sqrt(((-4.0 * U) * (n * t_1)));
    	} else {
    		tmp = sqrt(fabs((fma(t_1, -2.0, t) * 2.0)));
    	}
    	return tmp;
    }
    
    l_m = abs(l)
    function code(n, U, t, l_m, Om, U_42_)
    	t_1 = Float64(Float64(l_m / Om) * l_m)
    	tmp = 0.0
    	if (l_m <= 5.3e+79)
    		tmp = sqrt(Float64(Float64(U * n) * Float64(t + t)));
    	elseif (l_m <= 2.8e+183)
    		tmp = sqrt(Float64(Float64(-4.0 * U) * Float64(n * t_1)));
    	else
    		tmp = sqrt(abs(Float64(fma(t_1, -2.0, t) * 2.0)));
    	end
    	return tmp
    end
    
    l_m = N[Abs[l], $MachinePrecision]
    code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l$95$m / Om), $MachinePrecision] * l$95$m), $MachinePrecision]}, If[LessEqual[l$95$m, 5.3e+79], N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(t + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 2.8e+183], N[Sqrt[N[(N[(-4.0 * U), $MachinePrecision] * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(t$95$1 * -2.0 + t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]
    
    \begin{array}{l}
    l_m = \left|\ell\right|
    
    \\
    \begin{array}{l}
    t_1 := \frac{l\_m}{Om} \cdot l\_m\\
    \mathbf{if}\;l\_m \leq 5.3 \cdot 10^{+79}:\\
    \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\
    
    \mathbf{elif}\;l\_m \leq 2.8 \cdot 10^{+183}:\\
    \;\;\;\;\sqrt{\left(-4 \cdot U\right) \cdot \left(n \cdot t\_1\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{\left|\mathsf{fma}\left(t\_1, -2, t\right) \cdot 2\right|}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if l < 5.29999999999999978e79

      1. Initial program 50.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-*.f6436.1

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. Applied rewrites36.1%

        \[\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-+.f6436.1

          \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(t + \color{blue}{t}\right)} \]
      6. Applied rewrites36.1%

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t + t\right)}} \]

      if 5.29999999999999978e79 < l < 2.80000000000000018e183

      1. Initial program 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
        5. lower-pow.f6413.7

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
      7. Applied rewrites13.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sqrt{\left(-4 \cdot U\right) \cdot \left(n \cdot \left(\frac{\ell}{Om} \cdot \ell\right)\right)} \]
        16. lift-*.f6417.0

          \[\leadsto \sqrt{\left(-4 \cdot U\right) \cdot \left(n \cdot \left(\frac{\ell}{Om} \cdot \ell\right)\right)} \]
      9. Applied rewrites17.0%

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

      if 2.80000000000000018e183 < l

      1. Initial program 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

    Alternative 12: 43.4% accurate, 2.5× speedup?

    \[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 3.8 \cdot 10^{+79}:\\ \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(\left(l\_m \cdot n\right) \cdot l\_m\right)}{Om}}\\ \end{array} \end{array} \]
    l_m = (fabs.f64 l)
    (FPCore (n U t l_m Om U*)
     :precision binary64
     (if (<= l_m 3.8e+79)
       (sqrt (* (* U n) (+ t t)))
       (sqrt (* -4.0 (/ (* U (* (* l_m n) l_m)) 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 <= 3.8e+79) {
    		tmp = sqrt(((U * n) * (t + t)));
    	} else {
    		tmp = sqrt((-4.0 * ((U * ((l_m * n) * l_m)) / 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 <= 3.8d+79) then
            tmp = sqrt(((u * n) * (t + t)))
        else
            tmp = sqrt(((-4.0d0) * ((u * ((l_m * n) * l_m)) / 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 <= 3.8e+79) {
    		tmp = Math.sqrt(((U * n) * (t + t)));
    	} else {
    		tmp = Math.sqrt((-4.0 * ((U * ((l_m * n) * l_m)) / Om)));
    	}
    	return tmp;
    }
    
    l_m = math.fabs(l)
    def code(n, U, t, l_m, Om, U_42_):
    	tmp = 0
    	if l_m <= 3.8e+79:
    		tmp = math.sqrt(((U * n) * (t + t)))
    	else:
    		tmp = math.sqrt((-4.0 * ((U * ((l_m * n) * l_m)) / Om)))
    	return tmp
    
    l_m = abs(l)
    function code(n, U, t, l_m, Om, U_42_)
    	tmp = 0.0
    	if (l_m <= 3.8e+79)
    		tmp = sqrt(Float64(Float64(U * n) * Float64(t + t)));
    	else
    		tmp = sqrt(Float64(-4.0 * Float64(Float64(U * Float64(Float64(l_m * n) * l_m)) / 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 <= 3.8e+79)
    		tmp = sqrt(((U * n) * (t + t)));
    	else
    		tmp = sqrt((-4.0 * ((U * ((l_m * n) * l_m)) / 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, 3.8e+79], N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(t + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(N[(U * N[(N[(l$95$m * n), $MachinePrecision] * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    l_m = \left|\ell\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;l\_m \leq 3.8 \cdot 10^{+79}:\\
    \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(\left(l\_m \cdot n\right) \cdot l\_m\right)}{Om}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if l < 3.8000000000000002e79

      1. Initial program 50.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-*.f6436.1

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. Applied rewrites36.1%

        \[\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-+.f6436.1

          \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(t + \color{blue}{t}\right)} \]
      6. Applied rewrites36.1%

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t + t\right)}} \]

      if 3.8000000000000002e79 < l

      1. Initial program 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
        5. lower-pow.f6413.7

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
      7. Applied rewrites13.7%

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

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

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

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

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

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

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

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left(\left(\ell \cdot n\right) \cdot \ell\right)}{Om}} \]
        8. lower-*.f6416.7

          \[\leadsto \sqrt{-4 \cdot \frac{U \cdot \left(\left(\ell \cdot n\right) \cdot \ell\right)}{Om}} \]
      9. Applied rewrites16.7%

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

    Alternative 13: 38.4% accurate, 2.9× speedup?

    \[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;t \leq -1.72 \cdot 10^{-307}:\\ \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}}\\ \end{array} \end{array} \]
    l_m = (fabs.f64 l)
    (FPCore (n U t l_m Om U*)
     :precision binary64
     (if (<= t -1.72e-307)
       (sqrt (* (* U n) (+ t t)))
       (* t (sqrt (* 2.0 (/ (* 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 (t <= -1.72e-307) {
    		tmp = sqrt(((U * n) * (t + t)));
    	} else {
    		tmp = t * sqrt((2.0 * ((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 (t <= (-1.72d-307)) then
            tmp = sqrt(((u * n) * (t + t)))
        else
            tmp = t * sqrt((2.0d0 * ((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 (t <= -1.72e-307) {
    		tmp = Math.sqrt(((U * n) * (t + t)));
    	} else {
    		tmp = t * Math.sqrt((2.0 * ((U * n) / t)));
    	}
    	return tmp;
    }
    
    l_m = math.fabs(l)
    def code(n, U, t, l_m, Om, U_42_):
    	tmp = 0
    	if t <= -1.72e-307:
    		tmp = math.sqrt(((U * n) * (t + t)))
    	else:
    		tmp = t * math.sqrt((2.0 * ((U * n) / t)))
    	return tmp
    
    l_m = abs(l)
    function code(n, U, t, l_m, Om, U_42_)
    	tmp = 0.0
    	if (t <= -1.72e-307)
    		tmp = sqrt(Float64(Float64(U * n) * Float64(t + t)));
    	else
    		tmp = Float64(t * sqrt(Float64(2.0 * Float64(Float64(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 (t <= -1.72e-307)
    		tmp = sqrt(((U * n) * (t + t)));
    	else
    		tmp = t * sqrt((2.0 * ((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[t, -1.72e-307], N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(t + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t * N[Sqrt[N[(2.0 * N[(N[(U * n), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    l_m = \left|\ell\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;t \leq -1.72 \cdot 10^{-307}:\\
    \;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(t + t\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -1.72000000000000008e-307

      1. Initial program 50.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-*.f6436.1

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. Applied rewrites36.1%

        \[\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-+.f6436.1

          \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(t + \color{blue}{t}\right)} \]
      6. Applied rewrites36.1%

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t + t\right)}} \]

      if -1.72000000000000008e-307 < t

      1. Initial program 50.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 \color{blue}{t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto t \cdot \color{blue}{\sqrt{2 \cdot \frac{U \cdot n}{t}}} \]
        2. lower-sqrt.f64N/A

          \[\leadsto t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}} \]
        3. lower-*.f64N/A

          \[\leadsto t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}} \]
        4. lower-/.f64N/A

          \[\leadsto t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}} \]
        5. lower-*.f6418.5

          \[\leadsto t \cdot \sqrt{2 \cdot \frac{U \cdot n}{t}} \]
      4. Applied rewrites18.5%

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

    Alternative 14: 38.3% accurate, 0.8× 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 2 \cdot 10^{-322}:\\ \;\;\;\;\sqrt{\left(n + n\right) \cdot \left(U \cdot t\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 (<=
          (*
           (* (* 2.0 n) U)
           (-
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U U*))))
          2e-322)
       (sqrt (* (+ n n) (* U t)))
       (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 ((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))) <= 2e-322) {
    		tmp = sqrt(((n + n) * (U * t)));
    	} 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 ((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) - ((n * ((l_m / om) ** 2.0d0)) * (u - u_42)))) <= 2d-322) then
            tmp = sqrt(((n + n) * (u * t)))
        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 ((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * Math.pow((l_m / Om), 2.0)) * (U - U_42_)))) <= 2e-322) {
    		tmp = Math.sqrt(((n + n) * (U * t)));
    	} 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 (((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * math.pow((l_m / Om), 2.0)) * (U - U_42_)))) <= 2e-322:
    		tmp = math.sqrt(((n + n) * (U * t)))
    	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 (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_)))) <= 2e-322)
    		tmp = sqrt(Float64(Float64(n + n) * Float64(U * t)));
    	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 ((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * ((l_m / Om) ^ 2.0)) * (U - U_42_)))) <= 2e-322)
    		tmp = sqrt(((n + n) * (U * t)));
    	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[(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], 2e-322], N[Sqrt[N[(N[(n + n), $MachinePrecision] * N[(U * t), $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}\;\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 2 \cdot 10^{-322}:\\
    \;\;\;\;\sqrt{\left(n + n\right) \cdot \left(U \cdot t\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 (*.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.97626e-322

      1. Initial program 50.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{\color{blue}{\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. lift-*.f64N/A

          \[\leadsto \sqrt{\color{blue}{\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)} \]
        3. associate-*l*N/A

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

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

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

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

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

          \[\leadsto \sqrt{\left(n + n\right) \cdot \color{blue}{\left(\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) \cdot U\right)}} \]
        9. lower-*.f6450.1

          \[\leadsto \sqrt{\left(n + n\right) \cdot \color{blue}{\left(\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) \cdot U\right)}} \]
      3. Applied rewrites45.0%

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

        \[\leadsto \sqrt{\left(n + n\right) \cdot \color{blue}{\left(U \cdot t\right)}} \]
      5. Step-by-step derivation
        1. lower-*.f6435.4

          \[\leadsto \sqrt{\left(n + n\right) \cdot \left(U \cdot \color{blue}{t}\right)} \]
      6. Applied rewrites35.4%

        \[\leadsto \sqrt{\left(n + n\right) \cdot \color{blue}{\left(U \cdot t\right)}} \]

      if 1.97626e-322 < (*.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 50.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-*.f6436.1

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. Applied rewrites36.1%

        \[\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-+.f6436.1

          \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(t + \color{blue}{t}\right)} \]
      6. Applied rewrites36.1%

        \[\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 15: 36.1% 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(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*)))))
          0.0)
       (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_))))) <= 0.0) {
    		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))))) <= 0.0d0) 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_))))) <= 0.0) {
    		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_))))) <= 0.0:
    		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_))))) <= 0.0)
    		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_))))) <= 0.0)
    		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], 0.0], 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 0:\\
    \;\;\;\;\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*))))) < 0.0

      1. Initial program 50.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-*.f6436.1

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. Applied rewrites36.1%

        \[\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. lower-*.f64N/A

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

          \[\leadsto \sqrt{\left(\left(1 + 1\right) \cdot U\right) \cdot \left(n \cdot t\right)} \]
        6. flip-+N/A

          \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{1 - 1} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        7. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{1 - 1 \cdot 1}{1 - 1} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        8. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{1 - 1}{1 - 1} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        9. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{0}{1 - 1} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        10. +-inversesN/A

          \[\leadsto \sqrt{\left(\frac{n \cdot n - n \cdot n}{1 - 1} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        11. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{n \cdot n - n \cdot n}{0} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        12. +-inversesN/A

          \[\leadsto \sqrt{\left(\frac{n \cdot n - n \cdot n}{n - n} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        13. flip-+N/A

          \[\leadsto \sqrt{\left(\left(n + n\right) \cdot U\right) \cdot \left(n \cdot t\right)} \]
        14. count-2-revN/A

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

          \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(n \cdot t\right)} \]
        16. lower-*.f647.1

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

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

          \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(n \cdot t\right)} \]
        19. count-2-revN/A

          \[\leadsto \sqrt{\left(\left(n + n\right) \cdot U\right) \cdot \left(n \cdot t\right)} \]
        20. flip-+N/A

          \[\leadsto \sqrt{\left(\frac{n \cdot n - n \cdot n}{n - n} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        21. +-inversesN/A

          \[\leadsto \sqrt{\left(\frac{0}{n - n} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        22. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{1 - 1}{n - n} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        23. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1}{n - n} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        24. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{n - n} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        25. +-inversesN/A

          \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{0} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        26. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{1 - 1} \cdot U\right) \cdot \left(n \cdot t\right)} \]
        27. flip-+N/A

          \[\leadsto \sqrt{\left(\left(1 + 1\right) \cdot U\right) \cdot \left(n \cdot t\right)} \]
        28. metadata-evalN/A

          \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)} \]
        29. count-2-revN/A

          \[\leadsto \sqrt{\left(U + U\right) \cdot \left(\color{blue}{n} \cdot t\right)} \]
        30. lower-+.f6436.1

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

          \[\leadsto \sqrt{\left(U + U\right) \cdot \left(n \cdot \color{blue}{t}\right)} \]
      6. Applied rewrites36.1%

        \[\leadsto \sqrt{\left(U + U\right) \cdot \color{blue}{\left(t \cdot 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*)))))

      1. Initial program 50.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-*.f6436.1

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. Applied rewrites36.1%

        \[\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-+.f6436.1

          \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(t + \color{blue}{t}\right)} \]
      6. Applied rewrites36.1%

        \[\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: 36.0% 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 50.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-*.f6436.1

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites36.1%

      \[\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-+.f6436.1

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(t + \color{blue}{t}\right)} \]
    6. Applied rewrites36.1%

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

    Alternative 17: 8.3% accurate, 5.6× speedup?

    \[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{\left|t \cdot \left(U + U\right)\right|} \end{array} \]
    l_m = (fabs.f64 l)
    (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (fabs (* t (+ U U)))))
    l_m = fabs(l);
    double code(double n, double U, double t, double l_m, double Om, double U_42_) {
    	return sqrt(fabs((t * (U + U))));
    }
    
    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(abs((t * (u + u))))
    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(Math.abs((t * (U + U))));
    }
    
    l_m = math.fabs(l)
    def code(n, U, t, l_m, Om, U_42_):
    	return math.sqrt(math.fabs((t * (U + U))))
    
    l_m = abs(l)
    function code(n, U, t, l_m, Om, U_42_)
    	return sqrt(abs(Float64(t * Float64(U + U))))
    end
    
    l_m = abs(l);
    function tmp = code(n, U, t, l_m, Om, U_42_)
    	tmp = sqrt(abs((t * (U + U))));
    end
    
    l_m = N[Abs[l], $MachinePrecision]
    code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[Abs[N[(t * N[(U + U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    l_m = \left|\ell\right|
    
    \\
    \sqrt{\left|t \cdot \left(U + U\right)\right|}
    \end{array}
    
    Derivation
    1. Initial program 50.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-*.f6436.1

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites36.1%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. rem-square-sqrtN/A

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

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

        \[\leadsto \sqrt{\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)} \cdot \color{blue}{\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}}} \]
      4. sqr-abs-revN/A

        \[\leadsto \sqrt{\color{blue}{\left|\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\right| \cdot \left|\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\right|}} \]
    6. Applied rewrites8.3%

      \[\leadsto \sqrt{\color{blue}{\left|t \cdot \left(U + U\right)\right|}} \]
    7. Add Preprocessing

    Alternative 18: 6.9% accurate, 4.3× speedup?

    \[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq -2.1 \cdot 10^{-242}:\\ \;\;\;\;\sqrt{\left|t + t\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot t\right)}\\ \end{array} \end{array} \]
    l_m = (fabs.f64 l)
    (FPCore (n U t l_m Om U*)
     :precision binary64
     (if (<= U -2.1e-242) (sqrt (fabs (+ t t))) (sqrt (* 2.0 (* 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 (U <= -2.1e-242) {
    		tmp = sqrt(fabs((t + t)));
    	} else {
    		tmp = sqrt((2.0 * (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 (u <= (-2.1d-242)) then
            tmp = sqrt(abs((t + t)))
        else
            tmp = sqrt((2.0d0 * (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 (U <= -2.1e-242) {
    		tmp = Math.sqrt(Math.abs((t + t)));
    	} else {
    		tmp = Math.sqrt((2.0 * (n * t)));
    	}
    	return tmp;
    }
    
    l_m = math.fabs(l)
    def code(n, U, t, l_m, Om, U_42_):
    	tmp = 0
    	if U <= -2.1e-242:
    		tmp = math.sqrt(math.fabs((t + t)))
    	else:
    		tmp = math.sqrt((2.0 * (n * t)))
    	return tmp
    
    l_m = abs(l)
    function code(n, U, t, l_m, Om, U_42_)
    	tmp = 0.0
    	if (U <= -2.1e-242)
    		tmp = sqrt(abs(Float64(t + t)));
    	else
    		tmp = sqrt(Float64(2.0 * Float64(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 (U <= -2.1e-242)
    		tmp = sqrt(abs((t + t)));
    	else
    		tmp = sqrt((2.0 * (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[U, -2.1e-242], N[Sqrt[N[Abs[N[(t + t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    l_m = \left|\ell\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;U \leq -2.1 \cdot 10^{-242}:\\
    \;\;\;\;\sqrt{\left|t + t\right|}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{2 \cdot \left(n \cdot t\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if U < -2.10000000000000019e-242

      1. Initial program 50.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-*.f6436.1

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
      4. Applied rewrites36.1%

        \[\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-*.f6436.1

          \[\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. count-2-revN/A

          \[\leadsto \sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t} \]
        14. flip-+N/A

          \[\leadsto \sqrt{\left(\frac{n \cdot n - n \cdot n}{n - n} \cdot U\right) \cdot t} \]
        15. +-inversesN/A

          \[\leadsto \sqrt{\left(\frac{0}{n - n} \cdot U\right) \cdot t} \]
        16. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{1 - 1}{n - n} \cdot U\right) \cdot t} \]
        17. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1}{n - n} \cdot U\right) \cdot t} \]
        18. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{n - n} \cdot U\right) \cdot t} \]
        19. +-inversesN/A

          \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{0} \cdot U\right) \cdot t} \]
        20. metadata-evalN/A

          \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{1 - 1} \cdot U\right) \cdot t} \]
        21. flip-+N/A

          \[\leadsto \sqrt{\left(\left(1 + 1\right) \cdot U\right) \cdot t} \]
        22. metadata-evalN/A

          \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot t} \]
        23. count-2-revN/A

          \[\leadsto \sqrt{\left(U + U\right) \cdot t} \]
        24. lower-+.f644.8

          \[\leadsto \sqrt{\left(U + U\right) \cdot t} \]
      6. Applied rewrites4.8%

        \[\leadsto \sqrt{\left(U + U\right) \cdot \color{blue}{t}} \]
      7. Applied rewrites2.9%

        \[\leadsto \sqrt{\color{blue}{t \cdot 2}} \]
      8. Step-by-step derivation
        1. rem-square-sqrtN/A

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

          \[\leadsto \sqrt{\color{blue}{\sqrt{t \cdot 2}} \cdot \sqrt{t \cdot 2}} \]
        3. lift-sqrt.f64N/A

          \[\leadsto \sqrt{\sqrt{t \cdot 2} \cdot \color{blue}{\sqrt{t \cdot 2}}} \]
        4. sqr-abs-revN/A

          \[\leadsto \sqrt{\color{blue}{\left|\sqrt{t \cdot 2}\right| \cdot \left|\sqrt{t \cdot 2}\right|}} \]
        5. mul-fabsN/A

          \[\leadsto \sqrt{\color{blue}{\left|\sqrt{t \cdot 2} \cdot \sqrt{t \cdot 2}\right|}} \]
      9. Applied rewrites5.9%

        \[\leadsto \sqrt{\color{blue}{\left|t + t\right|}} \]

      if -2.10000000000000019e-242 < U

      1. Initial program 50.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 n around 0

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

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

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

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{\color{blue}{Om}}\right)\right)\right)} \]
        7. lower-pow.f6444.6

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{1 \cdot 1 - 1}{U - U}} \]
        12. metadata-evalN/A

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - 1}{U - U}} \]
        14. metadata-evalN/A

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - 1 \cdot 1}{U - U}} \]
        15. metadata-evalN/A

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot 1}{U - U}} \]
        16. metadata-evalN/A

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{0}} \]
        18. metadata-evalN/A

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{1 \cdot 1 - 1}} \]
        20. metadata-evalN/A

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} \cdot 1 - 1}} \]
        21. metadata-evalN/A

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} \cdot \frac{2}{2} - 1}} \]
        22. metadata-evalN/A

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot 1}} \]
        24. metadata-evalN/A

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{\color{blue}{2}}}} \]
        25. metadata-evalN/A

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

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

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} - \color{blue}{\frac{2}{2}} \cdot \frac{2}{2}}} \]
        29. metadata-evalN/A

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

          \[\leadsto \sqrt{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \frac{\frac{2}{2} \cdot \frac{2}{2} - \frac{2}{2} \cdot \frac{2}{2}}{\frac{2}{2} - 1 \cdot 1}} \]
      6. Applied rewrites9.7%

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

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

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

          \[\leadsto \sqrt{2 \cdot \left(n \cdot t\right)} \]
      9. Applied rewrites5.8%

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

    Alternative 19: 5.9% accurate, 8.0× speedup?

    \[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{\left|t + t\right|} \end{array} \]
    l_m = (fabs.f64 l)
    (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (fabs (+ t t))))
    l_m = fabs(l);
    double code(double n, double U, double t, double l_m, double Om, double U_42_) {
    	return sqrt(fabs((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(abs((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(Math.abs((t + t)));
    }
    
    l_m = math.fabs(l)
    def code(n, U, t, l_m, Om, U_42_):
    	return math.sqrt(math.fabs((t + t)))
    
    l_m = abs(l)
    function code(n, U, t, l_m, Om, U_42_)
    	return sqrt(abs(Float64(t + t)))
    end
    
    l_m = abs(l);
    function tmp = code(n, U, t, l_m, Om, U_42_)
    	tmp = sqrt(abs((t + t)));
    end
    
    l_m = N[Abs[l], $MachinePrecision]
    code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[Abs[N[(t + t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    l_m = \left|\ell\right|
    
    \\
    \sqrt{\left|t + t\right|}
    \end{array}
    
    Derivation
    1. Initial program 50.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-*.f6436.1

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites36.1%

      \[\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-*.f6436.1

        \[\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. count-2-revN/A

        \[\leadsto \sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t} \]
      14. flip-+N/A

        \[\leadsto \sqrt{\left(\frac{n \cdot n - n \cdot n}{n - n} \cdot U\right) \cdot t} \]
      15. +-inversesN/A

        \[\leadsto \sqrt{\left(\frac{0}{n - n} \cdot U\right) \cdot t} \]
      16. metadata-evalN/A

        \[\leadsto \sqrt{\left(\frac{1 - 1}{n - n} \cdot U\right) \cdot t} \]
      17. metadata-evalN/A

        \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1}{n - n} \cdot U\right) \cdot t} \]
      18. metadata-evalN/A

        \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{n - n} \cdot U\right) \cdot t} \]
      19. +-inversesN/A

        \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{0} \cdot U\right) \cdot t} \]
      20. metadata-evalN/A

        \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{1 - 1} \cdot U\right) \cdot t} \]
      21. flip-+N/A

        \[\leadsto \sqrt{\left(\left(1 + 1\right) \cdot U\right) \cdot t} \]
      22. metadata-evalN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot t} \]
      23. count-2-revN/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot t} \]
      24. lower-+.f644.8

        \[\leadsto \sqrt{\left(U + U\right) \cdot t} \]
    6. Applied rewrites4.8%

      \[\leadsto \sqrt{\left(U + U\right) \cdot \color{blue}{t}} \]
    7. Applied rewrites2.9%

      \[\leadsto \sqrt{\color{blue}{t \cdot 2}} \]
    8. Step-by-step derivation
      1. rem-square-sqrtN/A

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

        \[\leadsto \sqrt{\color{blue}{\sqrt{t \cdot 2}} \cdot \sqrt{t \cdot 2}} \]
      3. lift-sqrt.f64N/A

        \[\leadsto \sqrt{\sqrt{t \cdot 2} \cdot \color{blue}{\sqrt{t \cdot 2}}} \]
      4. sqr-abs-revN/A

        \[\leadsto \sqrt{\color{blue}{\left|\sqrt{t \cdot 2}\right| \cdot \left|\sqrt{t \cdot 2}\right|}} \]
      5. mul-fabsN/A

        \[\leadsto \sqrt{\color{blue}{\left|\sqrt{t \cdot 2} \cdot \sqrt{t \cdot 2}\right|}} \]
    9. Applied rewrites5.9%

      \[\leadsto \sqrt{\color{blue}{\left|t + t\right|}} \]
    10. Add Preprocessing

    Alternative 20: 2.9% accurate, 9.8× speedup?

    \[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{t + t} \end{array} \]
    l_m = (fabs.f64 l)
    (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (+ t t)))
    l_m = fabs(l);
    double code(double n, double U, double t, double l_m, double Om, double U_42_) {
    	return sqrt((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((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((t + t));
    }
    
    l_m = math.fabs(l)
    def code(n, U, t, l_m, Om, U_42_):
    	return math.sqrt((t + t))
    
    l_m = abs(l)
    function code(n, U, t, l_m, Om, U_42_)
    	return sqrt(Float64(t + t))
    end
    
    l_m = abs(l);
    function tmp = code(n, U, t, l_m, Om, U_42_)
    	tmp = sqrt((t + t));
    end
    
    l_m = N[Abs[l], $MachinePrecision]
    code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(t + t), $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    l_m = \left|\ell\right|
    
    \\
    \sqrt{t + t}
    \end{array}
    
    Derivation
    1. Initial program 50.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-*.f6436.1

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{t}\right)\right)} \]
    4. Applied rewrites36.1%

      \[\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-*.f6436.1

        \[\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. count-2-revN/A

        \[\leadsto \sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t} \]
      14. flip-+N/A

        \[\leadsto \sqrt{\left(\frac{n \cdot n - n \cdot n}{n - n} \cdot U\right) \cdot t} \]
      15. +-inversesN/A

        \[\leadsto \sqrt{\left(\frac{0}{n - n} \cdot U\right) \cdot t} \]
      16. metadata-evalN/A

        \[\leadsto \sqrt{\left(\frac{1 - 1}{n - n} \cdot U\right) \cdot t} \]
      17. metadata-evalN/A

        \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1}{n - n} \cdot U\right) \cdot t} \]
      18. metadata-evalN/A

        \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{n - n} \cdot U\right) \cdot t} \]
      19. +-inversesN/A

        \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{0} \cdot U\right) \cdot t} \]
      20. metadata-evalN/A

        \[\leadsto \sqrt{\left(\frac{1 \cdot 1 - 1 \cdot 1}{1 - 1} \cdot U\right) \cdot t} \]
      21. flip-+N/A

        \[\leadsto \sqrt{\left(\left(1 + 1\right) \cdot U\right) \cdot t} \]
      22. metadata-evalN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot t} \]
      23. count-2-revN/A

        \[\leadsto \sqrt{\left(U + U\right) \cdot t} \]
      24. lower-+.f644.8

        \[\leadsto \sqrt{\left(U + U\right) \cdot t} \]
    6. Applied rewrites4.8%

      \[\leadsto \sqrt{\left(U + U\right) \cdot \color{blue}{t}} \]
    7. Applied rewrites2.9%

      \[\leadsto \sqrt{\color{blue}{t \cdot 2}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{t}} \]
      3. count-2-revN/A

        \[\leadsto \sqrt{t + \color{blue}{t}} \]
      4. lower-+.f642.9

        \[\leadsto \sqrt{t + \color{blue}{t}} \]
    9. Applied rewrites2.9%

      \[\leadsto \sqrt{t + \color{blue}{t}} \]
    10. Add Preprocessing

    Reproduce

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