Toniolo and Linder, Equation (13)

Percentage Accurate: 50.1% → 64.2%
Time: 15.7s
Alternatives: 20
Speedup: 2.4×

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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (sqrt
  (*
   (* (* 2.0 n) U)
   (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
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: 64.2% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\\ \mathbf{if}\;n \leq -6.8 \cdot 10^{+89}:\\ \;\;\;\;\sqrt{t\_1 \cdot \left(\left(U \cdot 2\right) \cdot n\right)}\\ \mathbf{elif}\;n \leq 3.25 \cdot 10^{-134}:\\ \;\;\;\;\sqrt{\left(t\_1 \cdot \left(2 \cdot n\right)\right) \cdot U}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t\_1 \cdot U} \cdot \sqrt{2 \cdot n}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t)))
   (if (<= n -6.8e+89)
     (sqrt (* t_1 (* (* U 2.0) n)))
     (if (<= n 3.25e-134)
       (sqrt (* (* t_1 (* 2.0 n)) U))
       (* (sqrt (* t_1 U)) (sqrt (* 2.0 n)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t);
	double tmp;
	if (n <= -6.8e+89) {
		tmp = sqrt((t_1 * ((U * 2.0) * n)));
	} else if (n <= 3.25e-134) {
		tmp = sqrt(((t_1 * (2.0 * n)) * U));
	} else {
		tmp = sqrt((t_1 * U)) * sqrt((2.0 * n));
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t)
	tmp = 0.0
	if (n <= -6.8e+89)
		tmp = sqrt(Float64(t_1 * Float64(Float64(U * 2.0) * n)));
	elseif (n <= 3.25e-134)
		tmp = sqrt(Float64(Float64(t_1 * Float64(2.0 * n)) * U));
	else
		tmp = Float64(sqrt(Float64(t_1 * U)) * sqrt(Float64(2.0 * n)));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[n, -6.8e+89], N[Sqrt[N[(t$95$1 * N[(N[(U * 2.0), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 3.25e-134], N[Sqrt[N[(N[(t$95$1 * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(t$95$1 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\\
\mathbf{if}\;n \leq -6.8 \cdot 10^{+89}:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(\left(U \cdot 2\right) \cdot n\right)}\\

\mathbf{elif}\;n \leq 3.25 \cdot 10^{-134}:\\
\;\;\;\;\sqrt{\left(t\_1 \cdot \left(2 \cdot n\right)\right) \cdot U}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if n < -6.8000000000000004e89

    1. Initial program 57.2%

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.8000000000000004e89 < n < 3.2499999999999999e-134

    1. Initial program 50.2%

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.2499999999999999e-134 < n

    1. Initial program 54.1%

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 54.3% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 9.0%

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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*)))) < 4.00000000000000032e284

    1. Initial program 99.5%

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000032e284 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

    1. Initial program 24.6%

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 54.7% accurate, 0.4× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{t\_4 \cdot \left(t\_4 \cdot \left(\left(U* \cdot U\right) \cdot 2\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 9.0%

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in Om around -inf

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

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

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

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

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

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

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

    if 4.00000000000000032e284 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

    1. Initial program 24.6%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in n around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 54.1% accurate, 0.4× speedup?

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

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

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

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

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

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

              \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 99.5%

            \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in n around 0

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

              \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot \frac{{\ell}^{2}}{Om}\right)} \]
            2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

          if 4.00000000000000032e284 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

          1. Initial program 24.6%

            \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in n around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 5: 51.3% accurate, 0.4× speedup?

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

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

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

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

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

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

                    \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 99.5%

                  \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in n around 0

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

                    \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot \frac{{\ell}^{2}}{Om}\right)} \]
                  2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

                if 4.00000000000000032e284 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

                1. Initial program 24.6%

                  \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in n around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 6: 51.4% accurate, 0.4× speedup?

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

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

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

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

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

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

                        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    1. Initial program 99.5%

                      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                    2. Add Preprocessing
                    3. Taylor expanded in n around 0

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

                        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot \frac{{\ell}^{2}}{Om}\right)} \]
                      2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

                    if 4.00000000000000032e284 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

                    1. Initial program 24.6%

                      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                    2. Add Preprocessing
                    3. Taylor expanded in n around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 7: 48.8% accurate, 0.4× speedup?

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

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

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

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

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

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

                            \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        1. Initial program 99.5%

                          \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                        2. Add Preprocessing
                        3. Taylor expanded in n around 0

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

                            \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot \frac{{\ell}^{2}}{Om}\right)} \]
                          2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

                        if 4.00000000000000032e284 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

                        1. Initial program 24.6%

                          \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                        2. Add Preprocessing
                        3. Applied rewrites18.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 8: 50.2% accurate, 0.4× speedup?

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

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

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

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

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

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

                                \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in n around 0

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

                                \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot \frac{{\ell}^{2}}{Om}\right)} \]
                              2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

                              \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in U* around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 9: 49.1% accurate, 0.4× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\ell \cdot \ell}{Om}\\ t_2 := \mathsf{fma}\left(-2, t\_1, t\right)\\ t_3 := \left(2 \cdot n\right) \cdot U\\ t_4 := t\_3 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\ t_5 := \left(n \cdot t\right) \cdot U\\ \mathbf{if}\;t\_4 \leq 0:\\ \;\;\;\;\sqrt{\left(t\_2 \cdot U\right) \cdot \left(2 \cdot n\right)}\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;\sqrt{t\_3 \cdot t\_2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\sqrt{t\_5 \cdot t\_5} \cdot 2}\\ \end{array} \end{array} \]
                          (FPCore (n U t l Om U*)
                           :precision binary64
                           (let* ((t_1 (/ (* l l) Om))
                                  (t_2 (fma -2.0 t_1 t))
                                  (t_3 (* (* 2.0 n) U))
                                  (t_4
                                   (* t_3 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))
                                  (t_5 (* (* n t) U)))
                             (if (<= t_4 0.0)
                               (sqrt (* (* t_2 U) (* 2.0 n)))
                               (if (<= t_4 INFINITY)
                                 (sqrt (* t_3 t_2))
                                 (sqrt (* (sqrt (* t_5 t_5)) 2.0))))))
                          double code(double n, double U, double t, double l, double Om, double U_42_) {
                          	double t_1 = (l * l) / Om;
                          	double t_2 = fma(-2.0, t_1, t);
                          	double t_3 = (2.0 * n) * U;
                          	double t_4 = t_3 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
                          	double t_5 = (n * t) * U;
                          	double tmp;
                          	if (t_4 <= 0.0) {
                          		tmp = sqrt(((t_2 * U) * (2.0 * n)));
                          	} else if (t_4 <= ((double) INFINITY)) {
                          		tmp = sqrt((t_3 * t_2));
                          	} else {
                          		tmp = sqrt((sqrt((t_5 * t_5)) * 2.0));
                          	}
                          	return tmp;
                          }
                          
                          function code(n, U, t, l, Om, U_42_)
                          	t_1 = Float64(Float64(l * l) / Om)
                          	t_2 = fma(-2.0, t_1, t)
                          	t_3 = Float64(Float64(2.0 * n) * U)
                          	t_4 = Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))
                          	t_5 = Float64(Float64(n * t) * U)
                          	tmp = 0.0
                          	if (t_4 <= 0.0)
                          		tmp = sqrt(Float64(Float64(t_2 * U) * Float64(2.0 * n)));
                          	elseif (t_4 <= Inf)
                          		tmp = sqrt(Float64(t_3 * t_2));
                          	else
                          		tmp = sqrt(Float64(sqrt(Float64(t_5 * t_5)) * 2.0));
                          	end
                          	return tmp
                          end
                          
                          code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * t$95$1 + t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(t$95$2 * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[Sqrt[N[(t$95$5 * t$95$5), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]]]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \frac{\ell \cdot \ell}{Om}\\
                          t_2 := \mathsf{fma}\left(-2, t\_1, t\right)\\
                          t_3 := \left(2 \cdot n\right) \cdot U\\
                          t_4 := t\_3 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
                          t_5 := \left(n \cdot t\right) \cdot U\\
                          \mathbf{if}\;t\_4 \leq 0:\\
                          \;\;\;\;\sqrt{\left(t\_2 \cdot U\right) \cdot \left(2 \cdot n\right)}\\
                          
                          \mathbf{elif}\;t\_4 \leq \infty:\\
                          \;\;\;\;\sqrt{t\_3 \cdot t\_2}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\sqrt{\sqrt{t\_5 \cdot t\_5} \cdot 2}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0

                            1. Initial program 9.0%

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

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

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

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

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

                                \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in n around 0

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

                                \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot \frac{{\ell}^{2}}{Om}\right)} \]
                              2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

                              \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in t around inf

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

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

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

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

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

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

                              \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
                            6. Step-by-step derivation
                              1. Applied rewrites18.6%

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

                            Alternative 10: 46.1% accurate, 0.5× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\ell \cdot \ell}{Om}\\ t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\ \mathbf{if}\;t\_2 \leq 2 \cdot 10^{+104} \lor \neg \left(t\_2 \leq 2 \cdot 10^{+283}\right):\\ \;\;\;\;\sqrt{\left(\mathsf{fma}\left(-2, t\_1, t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\left(\left(U \cdot n\right) \cdot t\right) \cdot 2\right|}\\ \end{array} \end{array} \]
                            (FPCore (n U t l Om U*)
                             :precision binary64
                             (let* ((t_1 (/ (* l l) Om))
                                    (t_2
                                     (*
                                      (* (* 2.0 n) U)
                                      (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
                               (if (or (<= t_2 2e+104) (not (<= t_2 2e+283)))
                                 (sqrt (* (* (fma -2.0 t_1 t) U) (* 2.0 n)))
                                 (sqrt (fabs (* (* (* U n) t) 2.0))))))
                            double code(double n, double U, double t, double l, double Om, double U_42_) {
                            	double t_1 = (l * l) / Om;
                            	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
                            	double tmp;
                            	if ((t_2 <= 2e+104) || !(t_2 <= 2e+283)) {
                            		tmp = sqrt(((fma(-2.0, t_1, t) * U) * (2.0 * n)));
                            	} else {
                            		tmp = sqrt(fabs((((U * n) * t) * 2.0)));
                            	}
                            	return tmp;
                            }
                            
                            function code(n, U, t, l, Om, U_42_)
                            	t_1 = Float64(Float64(l * l) / Om)
                            	t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))
                            	tmp = 0.0
                            	if ((t_2 <= 2e+104) || !(t_2 <= 2e+283))
                            		tmp = sqrt(Float64(Float64(fma(-2.0, t_1, t) * U) * Float64(2.0 * n)));
                            	else
                            		tmp = sqrt(abs(Float64(Float64(Float64(U * n) * t) * 2.0)));
                            	end
                            	return tmp
                            end
                            
                            code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, 2e+104], N[Not[LessEqual[t$95$2, 2e+283]], $MachinePrecision]], N[Sqrt[N[(N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := \frac{\ell \cdot \ell}{Om}\\
                            t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
                            \mathbf{if}\;t\_2 \leq 2 \cdot 10^{+104} \lor \neg \left(t\_2 \leq 2 \cdot 10^{+283}\right):\\
                            \;\;\;\;\sqrt{\left(\mathsf{fma}\left(-2, t\_1, t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\sqrt{\left|\left(\left(U \cdot n\right) \cdot t\right) \cdot 2\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*)))) < 2e104 or 1.99999999999999991e283 < (*.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 44.8%

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

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

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

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

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

                                  \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 2e104 < (*.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.99999999999999991e283

                              1. Initial program 98.9%

                                \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in t around inf

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

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

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

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

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

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

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

                                  \[\leadsto \sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2} \]
                                2. Step-by-step derivation
                                  1. Applied rewrites82.6%

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

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

                                Alternative 11: 62.4% accurate, 0.7× speedup?

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

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

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

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

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

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

                                      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 12: 41.4% accurate, 0.8× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 0:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \mathsf{fma}\left(2, n, t\right)\right)} \cdot \sqrt{2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\left(\left(U \cdot n\right) \cdot t\right) \cdot 2\right|}\\ \end{array} \end{array} \]
                                (FPCore (n U t l Om U*)
                                 :precision binary64
                                 (if (<=
                                      (sqrt
                                       (*
                                        (* (* 2.0 n) U)
                                        (-
                                         (- t (* 2.0 (/ (* l l) Om)))
                                         (* (* n (pow (/ l Om) 2.0)) (- U U*)))))
                                      0.0)
                                   (* (sqrt (* U (* n (fma 2.0 n t)))) (sqrt 2.0))
                                   (sqrt (fabs (* (* (* U n) t) 2.0)))))
                                double code(double n, double U, double t, double l, double Om, double U_42_) {
                                	double tmp;
                                	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))))) <= 0.0) {
                                		tmp = sqrt((U * (n * fma(2.0, n, t)))) * sqrt(2.0);
                                	} else {
                                		tmp = sqrt(fabs((((U * n) * t) * 2.0)));
                                	}
                                	return tmp;
                                }
                                
                                function code(n, U, t, l, Om, U_42_)
                                	tmp = 0.0
                                	if (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_))))) <= 0.0)
                                		tmp = Float64(sqrt(Float64(U * Float64(n * fma(2.0, n, t)))) * sqrt(2.0));
                                	else
                                		tmp = sqrt(abs(Float64(Float64(Float64(U * n) * t) * 2.0)));
                                	end
                                	return tmp
                                end
                                
                                code[n_, U_, t_, l_, 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 * 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], 0.0], N[(N[Sqrt[N[(U * N[(n * N[(2.0 * n + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[Abs[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 0:\\
                                \;\;\;\;\sqrt{U \cdot \left(n \cdot \mathsf{fma}\left(2, n, t\right)\right)} \cdot \sqrt{2}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\sqrt{\left|\left(\left(U \cdot n\right) \cdot t\right) \cdot 2\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 11.2%

                                    \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                  2. Add Preprocessing
                                  3. Applied rewrites8.7%

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

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

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

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

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

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

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

                                      \[\leadsto \sqrt{U \cdot \left(n \cdot \color{blue}{\mathsf{fma}\left(2, n, t\right)}\right)} \cdot \sqrt{2} \]
                                    7. lower-sqrt.f6437.5

                                      \[\leadsto \sqrt{U \cdot \left(n \cdot \mathsf{fma}\left(2, n, t\right)\right)} \cdot \color{blue}{\sqrt{2}} \]
                                  6. Applied rewrites37.5%

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

                                  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 59.0%

                                    \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in t around inf

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

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

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

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

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

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

                                    \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites40.1%

                                      \[\leadsto \sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2} \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites43.3%

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

                                    Alternative 13: 47.2% accurate, 0.8× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\ell \cdot \ell}{Om}\\ t_2 := \mathsf{fma}\left(-2, t\_1, t\right)\\ t_3 := \left(2 \cdot n\right) \cdot U\\ \mathbf{if}\;t\_3 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq 0:\\ \;\;\;\;\sqrt{\left(t\_2 \cdot U\right) \cdot \left(2 \cdot n\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t\_3 \cdot t\_2}\\ \end{array} \end{array} \]
                                    (FPCore (n U t l Om U*)
                                     :precision binary64
                                     (let* ((t_1 (/ (* l l) Om)) (t_2 (fma -2.0 t_1 t)) (t_3 (* (* 2.0 n) U)))
                                       (if (<=
                                            (* t_3 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
                                            0.0)
                                         (sqrt (* (* t_2 U) (* 2.0 n)))
                                         (sqrt (* t_3 t_2)))))
                                    double code(double n, double U, double t, double l, double Om, double U_42_) {
                                    	double t_1 = (l * l) / Om;
                                    	double t_2 = fma(-2.0, t_1, t);
                                    	double t_3 = (2.0 * n) * U;
                                    	double tmp;
                                    	if ((t_3 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= 0.0) {
                                    		tmp = sqrt(((t_2 * U) * (2.0 * n)));
                                    	} else {
                                    		tmp = sqrt((t_3 * t_2));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(n, U, t, l, Om, U_42_)
                                    	t_1 = Float64(Float64(l * l) / Om)
                                    	t_2 = fma(-2.0, t_1, t)
                                    	t_3 = Float64(Float64(2.0 * n) * U)
                                    	tmp = 0.0
                                    	if (Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) <= 0.0)
                                    		tmp = sqrt(Float64(Float64(t_2 * U) * Float64(2.0 * n)));
                                    	else
                                    		tmp = sqrt(Float64(t_3 * t_2));
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * t$95$1 + t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[N[(t$95$3 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0], N[Sqrt[N[(N[(t$95$2 * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$3 * t$95$2), $MachinePrecision]], $MachinePrecision]]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \frac{\ell \cdot \ell}{Om}\\
                                    t_2 := \mathsf{fma}\left(-2, t\_1, t\right)\\
                                    t_3 := \left(2 \cdot n\right) \cdot U\\
                                    \mathbf{if}\;t\_3 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq 0:\\
                                    \;\;\;\;\sqrt{\left(t\_2 \cdot U\right) \cdot \left(2 \cdot n\right)}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\sqrt{t\_3 \cdot t\_2}\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0

                                      1. Initial program 9.0%

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

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

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

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

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

                                          \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      1. Initial program 61.1%

                                        \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in n around 0

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

                                          \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot \frac{{\ell}^{2}}{Om}\right)} \]
                                        2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

                                    Alternative 14: 41.4% accurate, 0.8× speedup?

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

                                        \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

                                        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 59.0%

                                          \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in t around inf

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

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

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

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

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

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

                                          \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites40.1%

                                            \[\leadsto \sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2} \]
                                          2. Step-by-step derivation
                                            1. Applied rewrites43.3%

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

                                          Alternative 15: 39.1% accurate, 0.9× speedup?

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

                                              \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

                                              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 59.0%

                                                \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in t around inf

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

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

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

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

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

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

                                                \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites40.1%

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

                                              Alternative 16: 64.2% accurate, 1.8× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\\ \mathbf{if}\;n \leq -6.8 \cdot 10^{+89}:\\ \;\;\;\;\sqrt{t\_1 \cdot \left(\left(U \cdot 2\right) \cdot n\right)}\\ \mathbf{elif}\;n \leq 3.25 \cdot 10^{-134}:\\ \;\;\;\;\sqrt{\left(t\_1 \cdot \left(2 \cdot n\right)\right) \cdot U}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \left(t\_1 \cdot U\right)}\\ \end{array} \end{array} \]
                                              (FPCore (n U t l Om U*)
                                               :precision binary64
                                               (let* ((t_1 (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t)))
                                                 (if (<= n -6.8e+89)
                                                   (sqrt (* t_1 (* (* U 2.0) n)))
                                                   (if (<= n 3.25e-134)
                                                     (sqrt (* (* t_1 (* 2.0 n)) U))
                                                     (* (sqrt n) (sqrt (* 2.0 (* t_1 U))))))))
                                              double code(double n, double U, double t, double l, double Om, double U_42_) {
                                              	double t_1 = fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t);
                                              	double tmp;
                                              	if (n <= -6.8e+89) {
                                              		tmp = sqrt((t_1 * ((U * 2.0) * n)));
                                              	} else if (n <= 3.25e-134) {
                                              		tmp = sqrt(((t_1 * (2.0 * n)) * U));
                                              	} else {
                                              		tmp = sqrt(n) * sqrt((2.0 * (t_1 * U)));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(n, U, t, l, Om, U_42_)
                                              	t_1 = fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t)
                                              	tmp = 0.0
                                              	if (n <= -6.8e+89)
                                              		tmp = sqrt(Float64(t_1 * Float64(Float64(U * 2.0) * n)));
                                              	elseif (n <= 3.25e-134)
                                              		tmp = sqrt(Float64(Float64(t_1 * Float64(2.0 * n)) * U));
                                              	else
                                              		tmp = Float64(sqrt(n) * sqrt(Float64(2.0 * Float64(t_1 * U))));
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[n, -6.8e+89], N[Sqrt[N[(t$95$1 * N[(N[(U * 2.0), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 3.25e-134], N[Sqrt[N[(N[(t$95$1 * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(t$95$1 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              t_1 := \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\\
                                              \mathbf{if}\;n \leq -6.8 \cdot 10^{+89}:\\
                                              \;\;\;\;\sqrt{t\_1 \cdot \left(\left(U \cdot 2\right) \cdot n\right)}\\
                                              
                                              \mathbf{elif}\;n \leq 3.25 \cdot 10^{-134}:\\
                                              \;\;\;\;\sqrt{\left(t\_1 \cdot \left(2 \cdot n\right)\right) \cdot U}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \left(t\_1 \cdot U\right)}\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if n < -6.8000000000000004e89

                                                1. Initial program 57.2%

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

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

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

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

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

                                                    \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if -6.8000000000000004e89 < n < 3.2499999999999999e-134

                                                1. Initial program 50.2%

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

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

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

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

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

                                                    \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 3.2499999999999999e-134 < n

                                                1. Initial program 54.1%

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

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

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

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

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

                                                    \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              Alternative 17: 59.8% accurate, 2.4× speedup?

                                              \[\begin{array}{l} \\ \sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot \left(2 \cdot n\right)\right) \cdot U} \end{array} \]
                                              (FPCore (n U t l Om U*)
                                               :precision binary64
                                               (sqrt
                                                (*
                                                 (* (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t) (* 2.0 n))
                                                 U)))
                                              double code(double n, double U, double t, double l, double Om, double U_42_) {
                                              	return sqrt(((fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t) * (2.0 * n)) * U));
                                              }
                                              
                                              function code(n, U, t, l, Om, U_42_)
                                              	return sqrt(Float64(Float64(fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t) * Float64(2.0 * n)) * U))
                                              end
                                              
                                              code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}
                                              \end{array}
                                              
                                              Derivation
                                              1. Initial program 52.8%

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

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

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

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

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

                                                  \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\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. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              Alternative 18: 41.8% accurate, 3.3× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2.95 \cdot 10^{-46}:\\ \;\;\;\;\sqrt{\left|\left(\left(U \cdot n\right) \cdot t\right) \cdot 2\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\ \end{array} \end{array} \]
                                              (FPCore (n U t l Om U*)
                                               :precision binary64
                                               (if (<= l 2.95e-46)
                                                 (sqrt (fabs (* (* (* U n) t) 2.0)))
                                                 (sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0))))
                                              double code(double n, double U, double t, double l, double Om, double U_42_) {
                                              	double tmp;
                                              	if (l <= 2.95e-46) {
                                              		tmp = sqrt(fabs((((U * n) * t) * 2.0)));
                                              	} else {
                                              		tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(n, U, t, l, Om, U_42_)
                                              	tmp = 0.0
                                              	if (l <= 2.95e-46)
                                              		tmp = sqrt(abs(Float64(Float64(Float64(U * n) * t) * 2.0)));
                                              	else
                                              		tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0));
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.95e-46], N[Sqrt[N[Abs[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;\ell \leq 2.95 \cdot 10^{-46}:\\
                                              \;\;\;\;\sqrt{\left|\left(\left(U \cdot n\right) \cdot t\right) \cdot 2\right|}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if l < 2.95e-46

                                                1. Initial program 55.5%

                                                  \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in t around inf

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

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

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

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

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

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

                                                  \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
                                                6. Step-by-step derivation
                                                  1. Applied rewrites41.2%

                                                    \[\leadsto \sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2} \]
                                                  2. Step-by-step derivation
                                                    1. Applied rewrites43.3%

                                                      \[\leadsto \sqrt{\left|\left(\left(U \cdot n\right) \cdot t\right) \cdot 2\right|} \]

                                                    if 2.95e-46 < l

                                                    1. Initial program 46.0%

                                                      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                                    2. Add Preprocessing
                                                    3. 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)}} \]
                                                    4. Step-by-step derivation
                                                      1. *-commutativeN/A

                                                        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right) \cdot 2}} \]
                                                      2. lower-*.f64N/A

                                                        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right) \cdot 2}} \]
                                                      3. *-commutativeN/A

                                                        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot U\right)} \cdot 2} \]
                                                      4. lower-*.f64N/A

                                                        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot U\right)} \cdot 2} \]
                                                      5. *-commutativeN/A

                                                        \[\leadsto \sqrt{\left(\color{blue}{\left(\left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot n\right)} \cdot U\right) \cdot 2} \]
                                                      6. lower-*.f64N/A

                                                        \[\leadsto \sqrt{\left(\color{blue}{\left(\left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot n\right)} \cdot U\right) \cdot 2} \]
                                                      7. metadata-evalN/A

                                                        \[\leadsto \sqrt{\left(\left(\left(t - \color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot \frac{{\ell}^{2}}{Om}\right) \cdot n\right) \cdot U\right) \cdot 2} \]
                                                      8. fp-cancel-sign-sub-invN/A

                                                        \[\leadsto \sqrt{\left(\left(\color{blue}{\left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot n\right) \cdot U\right) \cdot 2} \]
                                                      9. +-commutativeN/A

                                                        \[\leadsto \sqrt{\left(\left(\color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{Om} + t\right)} \cdot n\right) \cdot U\right) \cdot 2} \]
                                                      10. lower-fma.f64N/A

                                                        \[\leadsto \sqrt{\left(\left(\color{blue}{\mathsf{fma}\left(-2, \frac{{\ell}^{2}}{Om}, t\right)} \cdot n\right) \cdot U\right) \cdot 2} \]
                                                      11. lower-/.f64N/A

                                                        \[\leadsto \sqrt{\left(\left(\mathsf{fma}\left(-2, \color{blue}{\frac{{\ell}^{2}}{Om}}, t\right) \cdot n\right) \cdot U\right) \cdot 2} \]
                                                      12. unpow2N/A

                                                        \[\leadsto \sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\color{blue}{\ell \cdot \ell}}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2} \]
                                                      13. lower-*.f6442.2

                                                        \[\leadsto \sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\color{blue}{\ell \cdot \ell}}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2} \]
                                                    5. Applied rewrites42.2%

                                                      \[\leadsto \sqrt{\color{blue}{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}} \]
                                                  3. Recombined 2 regimes into one program.
                                                  4. Add Preprocessing

                                                  Alternative 19: 36.0% accurate, 6.8× speedup?

                                                  \[\begin{array}{l} \\ \sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2} \end{array} \]
                                                  (FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* U n) t) 2.0)))
                                                  double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                  	return sqrt((((U * n) * t) * 2.0));
                                                  }
                                                  
                                                  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((((u * n) * t) * 2.0d0))
                                                  end function
                                                  
                                                  public static double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                  	return Math.sqrt((((U * n) * t) * 2.0));
                                                  }
                                                  
                                                  def code(n, U, t, l, Om, U_42_):
                                                  	return math.sqrt((((U * n) * t) * 2.0))
                                                  
                                                  function code(n, U, t, l, Om, U_42_)
                                                  	return sqrt(Float64(Float64(Float64(U * n) * t) * 2.0))
                                                  end
                                                  
                                                  function tmp = code(n, U, t, l, Om, U_42_)
                                                  	tmp = sqrt((((U * n) * t) * 2.0));
                                                  end
                                                  
                                                  code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Initial program 52.8%

                                                    \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in t around inf

                                                    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
                                                  4. Step-by-step derivation
                                                    1. *-commutativeN/A

                                                      \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right) \cdot 2}} \]
                                                    2. lower-*.f64N/A

                                                      \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right) \cdot 2}} \]
                                                    3. *-commutativeN/A

                                                      \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right)} \cdot 2} \]
                                                    4. lower-*.f64N/A

                                                      \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right)} \cdot 2} \]
                                                    5. lower-*.f6435.0

                                                      \[\leadsto \sqrt{\left(\color{blue}{\left(n \cdot t\right)} \cdot U\right) \cdot 2} \]
                                                  5. Applied rewrites35.0%

                                                    \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites36.4%

                                                      \[\leadsto \sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2} \]
                                                    2. Add Preprocessing

                                                    Alternative 20: 2.4% accurate, 8.5× speedup?

                                                    \[\begin{array}{l} \\ \left(\sqrt{U} \cdot 2\right) \cdot n \end{array} \]
                                                    (FPCore (n U t l Om U*) :precision binary64 (* (* (sqrt U) 2.0) n))
                                                    double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                    	return (sqrt(U) * 2.0) * n;
                                                    }
                                                    
                                                    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(u) * 2.0d0) * n
                                                    end function
                                                    
                                                    public static double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                    	return (Math.sqrt(U) * 2.0) * n;
                                                    }
                                                    
                                                    def code(n, U, t, l, Om, U_42_):
                                                    	return (math.sqrt(U) * 2.0) * n
                                                    
                                                    function code(n, U, t, l, Om, U_42_)
                                                    	return Float64(Float64(sqrt(U) * 2.0) * n)
                                                    end
                                                    
                                                    function tmp = code(n, U, t, l, Om, U_42_)
                                                    	tmp = (sqrt(U) * 2.0) * n;
                                                    end
                                                    
                                                    code[n_, U_, t_, l_, Om_, U$42$_] := N[(N[(N[Sqrt[U], $MachinePrecision] * 2.0), $MachinePrecision] * n), $MachinePrecision]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \left(\sqrt{U} \cdot 2\right) \cdot n
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Initial program 52.8%

                                                      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                                    2. Add Preprocessing
                                                    3. Applied rewrites16.0%

                                                      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(n, 2, t\right) - \left(n \cdot \left(U - U*\right)\right) \cdot {\left(\frac{\ell}{Om}\right)}^{2}} \cdot \sqrt{U \cdot \left(n \cdot 2\right)}} \]
                                                    4. Taylor expanded in n around inf

                                                      \[\leadsto \color{blue}{\sqrt{U \cdot \left(2 - \frac{{\ell}^{2} \cdot \left(U - U*\right)}{{Om}^{2}}\right)} \cdot \left(n \cdot \sqrt{2}\right)} \]
                                                    5. Step-by-step derivation
                                                      1. lower-*.f64N/A

                                                        \[\leadsto \color{blue}{\sqrt{U \cdot \left(2 - \frac{{\ell}^{2} \cdot \left(U - U*\right)}{{Om}^{2}}\right)} \cdot \left(n \cdot \sqrt{2}\right)} \]
                                                      2. lower-sqrt.f64N/A

                                                        \[\leadsto \color{blue}{\sqrt{U \cdot \left(2 - \frac{{\ell}^{2} \cdot \left(U - U*\right)}{{Om}^{2}}\right)}} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      3. lower-*.f64N/A

                                                        \[\leadsto \sqrt{\color{blue}{U \cdot \left(2 - \frac{{\ell}^{2} \cdot \left(U - U*\right)}{{Om}^{2}}\right)}} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      4. lower--.f64N/A

                                                        \[\leadsto \sqrt{U \cdot \color{blue}{\left(2 - \frac{{\ell}^{2} \cdot \left(U - U*\right)}{{Om}^{2}}\right)}} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      5. unpow2N/A

                                                        \[\leadsto \sqrt{U \cdot \left(2 - \frac{{\ell}^{2} \cdot \left(U - U*\right)}{\color{blue}{Om \cdot Om}}\right)} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      6. times-fracN/A

                                                        \[\leadsto \sqrt{U \cdot \left(2 - \color{blue}{\frac{{\ell}^{2}}{Om} \cdot \frac{U - U*}{Om}}\right)} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      7. lower-*.f64N/A

                                                        \[\leadsto \sqrt{U \cdot \left(2 - \color{blue}{\frac{{\ell}^{2}}{Om} \cdot \frac{U - U*}{Om}}\right)} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      8. lower-/.f64N/A

                                                        \[\leadsto \sqrt{U \cdot \left(2 - \color{blue}{\frac{{\ell}^{2}}{Om}} \cdot \frac{U - U*}{Om}\right)} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      9. unpow2N/A

                                                        \[\leadsto \sqrt{U \cdot \left(2 - \frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot \frac{U - U*}{Om}\right)} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      10. lower-*.f64N/A

                                                        \[\leadsto \sqrt{U \cdot \left(2 - \frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot \frac{U - U*}{Om}\right)} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      11. lower-/.f64N/A

                                                        \[\leadsto \sqrt{U \cdot \left(2 - \frac{\ell \cdot \ell}{Om} \cdot \color{blue}{\frac{U - U*}{Om}}\right)} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      12. lower--.f64N/A

                                                        \[\leadsto \sqrt{U \cdot \left(2 - \frac{\ell \cdot \ell}{Om} \cdot \frac{\color{blue}{U - U*}}{Om}\right)} \cdot \left(n \cdot \sqrt{2}\right) \]
                                                      13. lower-*.f64N/A

                                                        \[\leadsto \sqrt{U \cdot \left(2 - \frac{\ell \cdot \ell}{Om} \cdot \frac{U - U*}{Om}\right)} \cdot \color{blue}{\left(n \cdot \sqrt{2}\right)} \]
                                                      14. lower-sqrt.f6412.0

                                                        \[\leadsto \sqrt{U \cdot \left(2 - \frac{\ell \cdot \ell}{Om} \cdot \frac{U - U*}{Om}\right)} \cdot \left(n \cdot \color{blue}{\sqrt{2}}\right) \]
                                                    6. Applied rewrites12.0%

                                                      \[\leadsto \color{blue}{\sqrt{U \cdot \left(2 - \frac{\ell \cdot \ell}{Om} \cdot \frac{U - U*}{Om}\right)} \cdot \left(n \cdot \sqrt{2}\right)} \]
                                                    7. Taylor expanded in l around 0

                                                      \[\leadsto \sqrt{U} \cdot \color{blue}{\left(n \cdot {\left(\sqrt{2}\right)}^{2}\right)} \]
                                                    8. Step-by-step derivation
                                                      1. Applied rewrites2.3%

                                                        \[\leadsto \left(\sqrt{U} \cdot n\right) \cdot \color{blue}{2} \]
                                                      2. Step-by-step derivation
                                                        1. Applied rewrites2.3%

                                                          \[\leadsto \left(\sqrt{U} \cdot 2\right) \cdot n \]
                                                        2. Add Preprocessing

                                                        Reproduce

                                                        ?
                                                        herbie shell --seed 2024350 
                                                        (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*))))))