Toniolo and Linder, Equation (13)

Percentage Accurate: 48.9% → 60.2%
Time: 12.9s
Alternatives: 26
Speedup: 0.5×

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 26 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: 48.9% 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: 60.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{t\_4 \cdot \left(t\_2 - \left(\frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot n\right)\right) \cdot \left(U - U*\right)\right)}\\

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


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

    1. Initial program 10.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-sqrt.f64N/A

        \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{\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) \cdot U}} \]
    4. Applied rewrites51.0%

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

    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*))))) < 4.9999999999999999e149

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

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

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

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

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

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

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

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

    if 4.9999999999999999e149 < (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 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 t around 0

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

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

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

      Alternative 2: 55.8% accurate, 0.3× 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 := \sqrt{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)}\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{n \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \left(\sqrt{U} \cdot \sqrt{2}\right)\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(\left(-\ell\right) \cdot \ell, \mathsf{fma}\left(\frac{n}{Om}, \frac{U - U*}{Om}, \frac{2}{Om}\right), t\right)}\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{t\_2 \cdot \left(t - \left(\frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot n\right)\right) \cdot \left(U - U*\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)\right) \cdot \left(n \cdot \left(-2 \cdot U\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
               (sqrt
                (*
                 t_2
                 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
         (if (<= t_3 0.0)
           (* (sqrt (* n (fma -2.0 t_1 t))) (* (sqrt U) (sqrt 2.0)))
           (if (<= t_3 5e-7)
             (sqrt
              (* t_2 (fma (* (- l) l) (fma (/ n Om) (/ (- U U*) Om) (/ 2.0 Om)) t)))
             (if (<= t_3 5e+149)
               (sqrt (* t_2 (- t (* (* (/ l Om) (* (/ l Om) n)) (- U U*)))))
               (sqrt
                (*
                 (* (* (/ l Om) l) (fma (/ n Om) (- U U*) 2.0))
                 (* n (* -2.0 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 = (2.0 * n) * U;
      	double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
      	double tmp;
      	if (t_3 <= 0.0) {
      		tmp = sqrt((n * fma(-2.0, t_1, t))) * (sqrt(U) * sqrt(2.0));
      	} else if (t_3 <= 5e-7) {
      		tmp = sqrt((t_2 * fma((-l * l), fma((n / Om), ((U - U_42_) / Om), (2.0 / Om)), t)));
      	} else if (t_3 <= 5e+149) {
      		tmp = sqrt((t_2 * (t - (((l / Om) * ((l / Om) * n)) * (U - U_42_)))));
      	} else {
      		tmp = sqrt(((((l / Om) * l) * fma((n / Om), (U - U_42_), 2.0)) * (n * (-2.0 * U))));
      	}
      	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 = sqrt(Float64(t_2 * 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_3 <= 0.0)
      		tmp = Float64(sqrt(Float64(n * fma(-2.0, t_1, t))) * Float64(sqrt(U) * sqrt(2.0)));
      	elseif (t_3 <= 5e-7)
      		tmp = sqrt(Float64(t_2 * fma(Float64(Float64(-l) * l), fma(Float64(n / Om), Float64(Float64(U - U_42_) / Om), Float64(2.0 / Om)), t)));
      	elseif (t_3 <= 5e+149)
      		tmp = sqrt(Float64(t_2 * Float64(t - Float64(Float64(Float64(l / Om) * Float64(Float64(l / Om) * n)) * Float64(U - U_42_)))));
      	else
      		tmp = sqrt(Float64(Float64(Float64(Float64(l / Om) * l) * fma(Float64(n / Om), Float64(U - U_42_), 2.0)) * Float64(n * Float64(-2.0 * U))));
      	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[Sqrt[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]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(n * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e-7], N[Sqrt[N[(t$95$2 * N[(N[((-l) * l), $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + N[(2.0 / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 5e+149], N[Sqrt[N[(t$95$2 * N[(t - N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(n * N[(-2.0 * U), $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 := \sqrt{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)}\\
      \mathbf{if}\;t\_3 \leq 0:\\
      \;\;\;\;\sqrt{n \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \left(\sqrt{U} \cdot \sqrt{2}\right)\\
      
      \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-7}:\\
      \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(\left(-\ell\right) \cdot \ell, \mathsf{fma}\left(\frac{n}{Om}, \frac{U - U*}{Om}, \frac{2}{Om}\right), t\right)}\\
      
      \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+149}:\\
      \;\;\;\;\sqrt{t\_2 \cdot \left(t - \left(\frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot n\right)\right) \cdot \left(U - U*\right)\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\sqrt{\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)\right) \cdot \left(n \cdot \left(-2 \cdot U\right)\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0

        1. Initial program 10.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 \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
        4. Step-by-step derivation
          1. Applied rewrites33.4%

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

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

            1. Initial program 93.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 l around 0

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

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

              if 4.99999999999999977e-7 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4.9999999999999999e149

              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

                if 4.9999999999999999e149 < (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 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 t around 0

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

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

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

                  Alternative 3: 56.0% accurate, 0.3× 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 := \sqrt{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)}\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{n \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \left(\sqrt{U} \cdot \sqrt{2}\right)\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{t\_2 \cdot \left(t - \left(\frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot n\right)\right) \cdot \left(U - U*\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)\right) \cdot \left(n \cdot \left(-2 \cdot U\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
                           (sqrt
                            (*
                             t_2
                             (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
                     (if (<= t_3 0.0)
                       (* (sqrt (* n (fma -2.0 t_1 t))) (* (sqrt U) (sqrt 2.0)))
                       (if (<= t_3 5e-7)
                         (sqrt (* t_2 (fma -2.0 (* l (/ l Om)) t)))
                         (if (<= t_3 5e+149)
                           (sqrt (* t_2 (- t (* (* (/ l Om) (* (/ l Om) n)) (- U U*)))))
                           (sqrt
                            (*
                             (* (* (/ l Om) l) (fma (/ n Om) (- U U*) 2.0))
                             (* n (* -2.0 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 = (2.0 * n) * U;
                  	double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
                  	double tmp;
                  	if (t_3 <= 0.0) {
                  		tmp = sqrt((n * fma(-2.0, t_1, t))) * (sqrt(U) * sqrt(2.0));
                  	} else if (t_3 <= 5e-7) {
                  		tmp = sqrt((t_2 * fma(-2.0, (l * (l / Om)), t)));
                  	} else if (t_3 <= 5e+149) {
                  		tmp = sqrt((t_2 * (t - (((l / Om) * ((l / Om) * n)) * (U - U_42_)))));
                  	} else {
                  		tmp = sqrt(((((l / Om) * l) * fma((n / Om), (U - U_42_), 2.0)) * (n * (-2.0 * U))));
                  	}
                  	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 = sqrt(Float64(t_2 * 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_3 <= 0.0)
                  		tmp = Float64(sqrt(Float64(n * fma(-2.0, t_1, t))) * Float64(sqrt(U) * sqrt(2.0)));
                  	elseif (t_3 <= 5e-7)
                  		tmp = sqrt(Float64(t_2 * fma(-2.0, Float64(l * Float64(l / Om)), t)));
                  	elseif (t_3 <= 5e+149)
                  		tmp = sqrt(Float64(t_2 * Float64(t - Float64(Float64(Float64(l / Om) * Float64(Float64(l / Om) * n)) * Float64(U - U_42_)))));
                  	else
                  		tmp = sqrt(Float64(Float64(Float64(Float64(l / Om) * l) * fma(Float64(n / Om), Float64(U - U_42_), 2.0)) * Float64(n * Float64(-2.0 * U))));
                  	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[Sqrt[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]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(n * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e-7], N[Sqrt[N[(t$95$2 * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 5e+149], N[Sqrt[N[(t$95$2 * N[(t - N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(n * N[(-2.0 * U), $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 := \sqrt{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)}\\
                  \mathbf{if}\;t\_3 \leq 0:\\
                  \;\;\;\;\sqrt{n \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \left(\sqrt{U} \cdot \sqrt{2}\right)\\
                  
                  \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-7}:\\
                  \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\
                  
                  \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+149}:\\
                  \;\;\;\;\sqrt{t\_2 \cdot \left(t - \left(\frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot n\right)\right) \cdot \left(U - U*\right)\right)}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\sqrt{\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)\right) \cdot \left(n \cdot \left(-2 \cdot U\right)\right)}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 4 regimes
                  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0

                    1. Initial program 10.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 \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
                    4. Step-by-step derivation
                      1. Applied rewrites33.4%

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

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

                        1. Initial program 93.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. Applied rewrites88.7%

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

                          if 4.99999999999999977e-7 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4.9999999999999999e149

                          1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

                            if 4.9999999999999999e149 < (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 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 t around 0

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

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

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

                              Alternative 4: 59.2% accurate, 0.4× speedup?

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

                                1. Initial program 10.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 \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites33.4%

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

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

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

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

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

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

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

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

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

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

                                    if 4.9999999999999999e149 < (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 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 t around 0

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

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

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

                                      Alternative 5: 58.5% accurate, 0.4× speedup?

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

                                        1. Initial program 10.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 \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites33.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 4.9999999999999999e149 < (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 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 t around 0

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

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

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

                                              Alternative 6: 58.0% accurate, 0.4× speedup?

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

                                                1. Initial program 10.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 \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
                                                4. Step-by-step derivation
                                                  1. Applied rewrites33.4%

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

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

                                                    1. Initial program 97.2%

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

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

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

                                                      if 4.9999999999999999e149 < (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 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 t around 0

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

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

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

                                                        Alternative 7: 54.4% 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 := \sqrt{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)}\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{n \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \left(\sqrt{U} \cdot \sqrt{2}\right)\\ \mathbf{elif}\;t\_3 \leq 4 \cdot 10^{-45}:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t\_2 \cdot \left(t - \frac{\ell}{Om} \cdot \left(\left(-U*\right) \cdot \left(\frac{\ell}{Om} \cdot n\right)\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
                                                                 (sqrt
                                                                  (*
                                                                   t_2
                                                                   (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
                                                           (if (<= t_3 0.0)
                                                             (* (sqrt (* n (fma -2.0 t_1 t))) (* (sqrt U) (sqrt 2.0)))
                                                             (if (<= t_3 4e-45)
                                                               (sqrt (* t_2 (fma -2.0 (* l (/ l Om)) t)))
                                                               (sqrt (* t_2 (- t (* (/ l Om) (* (- U*) (* (/ l Om) n))))))))))
                                                        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 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
                                                        	double tmp;
                                                        	if (t_3 <= 0.0) {
                                                        		tmp = sqrt((n * fma(-2.0, t_1, t))) * (sqrt(U) * sqrt(2.0));
                                                        	} else if (t_3 <= 4e-45) {
                                                        		tmp = sqrt((t_2 * fma(-2.0, (l * (l / Om)), t)));
                                                        	} else {
                                                        		tmp = sqrt((t_2 * (t - ((l / Om) * (-U_42_ * ((l / Om) * n))))));
                                                        	}
                                                        	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 = sqrt(Float64(t_2 * 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_3 <= 0.0)
                                                        		tmp = Float64(sqrt(Float64(n * fma(-2.0, t_1, t))) * Float64(sqrt(U) * sqrt(2.0)));
                                                        	elseif (t_3 <= 4e-45)
                                                        		tmp = sqrt(Float64(t_2 * fma(-2.0, Float64(l * Float64(l / Om)), t)));
                                                        	else
                                                        		tmp = sqrt(Float64(t_2 * Float64(t - Float64(Float64(l / Om) * Float64(Float64(-U_42_) * Float64(Float64(l / Om) * n))))));
                                                        	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[Sqrt[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]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(n * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e-45], N[Sqrt[N[(t$95$2 * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$2 * N[(t - N[(N[(l / Om), $MachinePrecision] * N[((-U$42$) * N[(N[(l / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $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 := \sqrt{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)}\\
                                                        \mathbf{if}\;t\_3 \leq 0:\\
                                                        \;\;\;\;\sqrt{n \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \left(\sqrt{U} \cdot \sqrt{2}\right)\\
                                                        
                                                        \mathbf{elif}\;t\_3 \leq 4 \cdot 10^{-45}:\\
                                                        \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\sqrt{t\_2 \cdot \left(t - \frac{\ell}{Om} \cdot \left(\left(-U*\right) \cdot \left(\frac{\ell}{Om} \cdot n\right)\right)\right)}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0

                                                          1. Initial program 10.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 \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
                                                          4. Step-by-step derivation
                                                            1. Applied rewrites33.4%

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

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

                                                              1. Initial program 95.7%

                                                                \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                                              2. 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. Applied rewrites94.5%

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

                                                                if 3.99999999999999994e-45 < (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 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. Step-by-step derivation
                                                                  1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  Alternative 8: 54.3% 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 := \sqrt{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)}\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{n \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \left(\sqrt{U} \cdot \sqrt{2}\right)\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)\right) \cdot \left(n \cdot \left(-2 \cdot U\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
                                                                           (sqrt
                                                                            (*
                                                                             t_2
                                                                             (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
                                                                     (if (<= t_3 0.0)
                                                                       (* (sqrt (* n (fma -2.0 t_1 t))) (* (sqrt U) (sqrt 2.0)))
                                                                       (if (<= t_3 5e+149)
                                                                         (sqrt (* t_2 (fma -2.0 (* l (/ l Om)) t)))
                                                                         (sqrt
                                                                          (*
                                                                           (* (* (/ l Om) l) (fma (/ n Om) (- U U*) 2.0))
                                                                           (* n (* -2.0 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 = (2.0 * n) * U;
                                                                  	double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
                                                                  	double tmp;
                                                                  	if (t_3 <= 0.0) {
                                                                  		tmp = sqrt((n * fma(-2.0, t_1, t))) * (sqrt(U) * sqrt(2.0));
                                                                  	} else if (t_3 <= 5e+149) {
                                                                  		tmp = sqrt((t_2 * fma(-2.0, (l * (l / Om)), t)));
                                                                  	} else {
                                                                  		tmp = sqrt(((((l / Om) * l) * fma((n / Om), (U - U_42_), 2.0)) * (n * (-2.0 * U))));
                                                                  	}
                                                                  	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 = sqrt(Float64(t_2 * 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_3 <= 0.0)
                                                                  		tmp = Float64(sqrt(Float64(n * fma(-2.0, t_1, t))) * Float64(sqrt(U) * sqrt(2.0)));
                                                                  	elseif (t_3 <= 5e+149)
                                                                  		tmp = sqrt(Float64(t_2 * fma(-2.0, Float64(l * Float64(l / Om)), t)));
                                                                  	else
                                                                  		tmp = sqrt(Float64(Float64(Float64(Float64(l / Om) * l) * fma(Float64(n / Om), Float64(U - U_42_), 2.0)) * Float64(n * Float64(-2.0 * U))));
                                                                  	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[Sqrt[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]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(n * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+149], N[Sqrt[N[(t$95$2 * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(n * N[(-2.0 * U), $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 := \sqrt{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)}\\
                                                                  \mathbf{if}\;t\_3 \leq 0:\\
                                                                  \;\;\;\;\sqrt{n \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \left(\sqrt{U} \cdot \sqrt{2}\right)\\
                                                                  
                                                                  \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+149}:\\
                                                                  \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;\sqrt{\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)\right) \cdot \left(n \cdot \left(-2 \cdot U\right)\right)}\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 3 regimes
                                                                  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0

                                                                    1. Initial program 10.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 \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
                                                                    4. Step-by-step derivation
                                                                      1. Applied rewrites33.4%

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

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

                                                                        1. Initial program 97.2%

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

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

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

                                                                          if 4.9999999999999999e149 < (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 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 t around 0

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

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

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

                                                                            Alternative 9: 54.3% 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 := \sqrt{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)}\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{2} \cdot \left(\sqrt{n \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \sqrt{U}\right)\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)\right) \cdot \left(n \cdot \left(-2 \cdot U\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
                                                                                     (sqrt
                                                                                      (*
                                                                                       t_2
                                                                                       (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
                                                                               (if (<= t_3 0.0)
                                                                                 (* (sqrt 2.0) (* (sqrt (* n (fma -2.0 t_1 t))) (sqrt U)))
                                                                                 (if (<= t_3 5e+149)
                                                                                   (sqrt (* t_2 (fma -2.0 (* l (/ l Om)) t)))
                                                                                   (sqrt
                                                                                    (*
                                                                                     (* (* (/ l Om) l) (fma (/ n Om) (- U U*) 2.0))
                                                                                     (* n (* -2.0 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 = (2.0 * n) * U;
                                                                            	double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
                                                                            	double tmp;
                                                                            	if (t_3 <= 0.0) {
                                                                            		tmp = sqrt(2.0) * (sqrt((n * fma(-2.0, t_1, t))) * sqrt(U));
                                                                            	} else if (t_3 <= 5e+149) {
                                                                            		tmp = sqrt((t_2 * fma(-2.0, (l * (l / Om)), t)));
                                                                            	} else {
                                                                            		tmp = sqrt(((((l / Om) * l) * fma((n / Om), (U - U_42_), 2.0)) * (n * (-2.0 * U))));
                                                                            	}
                                                                            	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 = sqrt(Float64(t_2 * 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_3 <= 0.0)
                                                                            		tmp = Float64(sqrt(2.0) * Float64(sqrt(Float64(n * fma(-2.0, t_1, t))) * sqrt(U)));
                                                                            	elseif (t_3 <= 5e+149)
                                                                            		tmp = sqrt(Float64(t_2 * fma(-2.0, Float64(l * Float64(l / Om)), t)));
                                                                            	else
                                                                            		tmp = sqrt(Float64(Float64(Float64(Float64(l / Om) * l) * fma(Float64(n / Om), Float64(U - U_42_), 2.0)) * Float64(n * Float64(-2.0 * U))));
                                                                            	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[Sqrt[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]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(n * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+149], N[Sqrt[N[(t$95$2 * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(n * N[(-2.0 * U), $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 := \sqrt{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)}\\
                                                                            \mathbf{if}\;t\_3 \leq 0:\\
                                                                            \;\;\;\;\sqrt{2} \cdot \left(\sqrt{n \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \sqrt{U}\right)\\
                                                                            
                                                                            \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+149}:\\
                                                                            \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;\sqrt{\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)\right) \cdot \left(n \cdot \left(-2 \cdot U\right)\right)}\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 3 regimes
                                                                            2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0

                                                                              1. Initial program 10.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 \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
                                                                              4. Step-by-step derivation
                                                                                1. Applied rewrites33.4%

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

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

                                                                                  1. Initial program 97.2%

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

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

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

                                                                                    if 4.9999999999999999e149 < (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 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 t around 0

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

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

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

                                                                                      Alternative 10: 54.7% accurate, 0.4× speedup?

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

                                                                                        1. Initial program 10.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{\color{blue}{n \cdot \left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)}{{Om}^{2}} + 2 \cdot \left(U \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. Applied rewrites33.5%

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

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

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

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

                                                                                            1. Initial program 97.2%

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

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

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

                                                                                              if 4.9999999999999999e149 < (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 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 t around 0

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

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

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

                                                                                                Alternative 11: 53.2% accurate, 0.4× speedup?

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

                                                                                                  1. Initial program 10.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{\color{blue}{n \cdot \left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)}{{Om}^{2}} + 2 \cdot \left(U \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. Applied rewrites33.5%

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

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

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

                                                                                                      if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +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. Step-by-step derivation
                                                                                                        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                        1. Initial program 0.0%

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

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

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

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

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

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

                                                                                                            Alternative 12: 53.4% accurate, 0.4× speedup?

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

                                                                                                              1. Initial program 10.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{\color{blue}{n \cdot \left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)}{{Om}^{2}} + 2 \cdot \left(U \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
                                                                                                              4. Step-by-step derivation
                                                                                                                1. Applied rewrites33.5%

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

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

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

                                                                                                                  if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +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. Applied rewrites64.2%

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

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

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

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

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

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

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

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

                                                                                                                        Alternative 13: 51.9% accurate, 0.4× speedup?

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

                                                                                                                          1. Initial program 10.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{\color{blue}{n \cdot \left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)}{{Om}^{2}} + 2 \cdot \left(U \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
                                                                                                                          4. Step-by-step derivation
                                                                                                                            1. Applied rewrites33.5%

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

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

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

                                                                                                                              if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +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. Applied rewrites64.2%

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

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

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

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

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

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

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

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

                                                                                                                                    Alternative 14: 53.5% 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)\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{\left(\left(n \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right) \cdot U\right) \cdot 2}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{2 \cdot \left(\left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot U*\right) \cdot U\right)}{Om \cdot Om} \cdot n}\\ \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*))))))
                                                                                                                                       (if (<= t_3 0.0)
                                                                                                                                         (sqrt (* (* (* n (fma -2.0 t_1 t)) U) 2.0))
                                                                                                                                         (if (<= t_3 INFINITY)
                                                                                                                                           (sqrt (* t_2 (fma -2.0 (* l (/ l Om)) t)))
                                                                                                                                           (sqrt (* (/ (* 2.0 (* (* (* (* l l) n) U*) U)) (* Om Om)) n))))))
                                                                                                                                    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 tmp;
                                                                                                                                    	if (t_3 <= 0.0) {
                                                                                                                                    		tmp = sqrt((((n * fma(-2.0, t_1, t)) * U) * 2.0));
                                                                                                                                    	} else if (t_3 <= ((double) INFINITY)) {
                                                                                                                                    		tmp = sqrt((t_2 * fma(-2.0, (l * (l / Om)), t)));
                                                                                                                                    	} else {
                                                                                                                                    		tmp = sqrt((((2.0 * ((((l * l) * n) * U_42_) * U)) / (Om * Om)) * n));
                                                                                                                                    	}
                                                                                                                                    	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_))))
                                                                                                                                    	tmp = 0.0
                                                                                                                                    	if (t_3 <= 0.0)
                                                                                                                                    		tmp = sqrt(Float64(Float64(Float64(n * fma(-2.0, t_1, t)) * U) * 2.0));
                                                                                                                                    	elseif (t_3 <= Inf)
                                                                                                                                    		tmp = sqrt(Float64(t_2 * fma(-2.0, Float64(l * Float64(l / Om)), t)));
                                                                                                                                    	else
                                                                                                                                    		tmp = sqrt(Float64(Float64(Float64(2.0 * Float64(Float64(Float64(Float64(l * l) * n) * U_42_) * U)) / Float64(Om * Om)) * n));
                                                                                                                                    	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]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(N[(n * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * U$42$), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * n), $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)\\
                                                                                                                                    \mathbf{if}\;t\_3 \leq 0:\\
                                                                                                                                    \;\;\;\;\sqrt{\left(\left(n \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right) \cdot U\right) \cdot 2}\\
                                                                                                                                    
                                                                                                                                    \mathbf{elif}\;t\_3 \leq \infty:\\
                                                                                                                                    \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\
                                                                                                                                    
                                                                                                                                    \mathbf{else}:\\
                                                                                                                                    \;\;\;\;\sqrt{\frac{2 \cdot \left(\left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot U*\right) \cdot U\right)}{Om \cdot Om} \cdot n}\\
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    \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.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 n around 0

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

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

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

                                                                                                                                          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. Applied rewrites64.2%

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

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

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

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

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

                                                                                                                                              Alternative 15: 53.5% 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)\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{\left(\left(n \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right) \cdot U\right) \cdot 2}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot U*\right) \cdot U\right) \cdot \frac{2}{Om \cdot Om}\right) \cdot n}\\ \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*))))))
                                                                                                                                                 (if (<= t_3 0.0)
                                                                                                                                                   (sqrt (* (* (* n (fma -2.0 t_1 t)) U) 2.0))
                                                                                                                                                   (if (<= t_3 INFINITY)
                                                                                                                                                     (sqrt (* t_2 (fma -2.0 (* l (/ l Om)) t)))
                                                                                                                                                     (sqrt (* (* (* (* (* (* l l) n) U*) U) (/ 2.0 (* Om Om))) n))))))
                                                                                                                                              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 tmp;
                                                                                                                                              	if (t_3 <= 0.0) {
                                                                                                                                              		tmp = sqrt((((n * fma(-2.0, t_1, t)) * U) * 2.0));
                                                                                                                                              	} else if (t_3 <= ((double) INFINITY)) {
                                                                                                                                              		tmp = sqrt((t_2 * fma(-2.0, (l * (l / Om)), t)));
                                                                                                                                              	} else {
                                                                                                                                              		tmp = sqrt(((((((l * l) * n) * U_42_) * U) * (2.0 / (Om * Om))) * n));
                                                                                                                                              	}
                                                                                                                                              	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_))))
                                                                                                                                              	tmp = 0.0
                                                                                                                                              	if (t_3 <= 0.0)
                                                                                                                                              		tmp = sqrt(Float64(Float64(Float64(n * fma(-2.0, t_1, t)) * U) * 2.0));
                                                                                                                                              	elseif (t_3 <= Inf)
                                                                                                                                              		tmp = sqrt(Float64(t_2 * fma(-2.0, Float64(l * Float64(l / Om)), t)));
                                                                                                                                              	else
                                                                                                                                              		tmp = sqrt(Float64(Float64(Float64(Float64(Float64(Float64(l * l) * n) * U_42_) * U) * Float64(2.0 / Float64(Om * Om))) * n));
                                                                                                                                              	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]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(N[(n * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * U$42$), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * n), $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)\\
                                                                                                                                              \mathbf{if}\;t\_3 \leq 0:\\
                                                                                                                                              \;\;\;\;\sqrt{\left(\left(n \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right) \cdot U\right) \cdot 2}\\
                                                                                                                                              
                                                                                                                                              \mathbf{elif}\;t\_3 \leq \infty:\\
                                                                                                                                              \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\
                                                                                                                                              
                                                                                                                                              \mathbf{else}:\\
                                                                                                                                              \;\;\;\;\sqrt{\left(\left(\left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot U*\right) \cdot U\right) \cdot \frac{2}{Om \cdot Om}\right) \cdot n}\\
                                                                                                                                              
                                                                                                                                              
                                                                                                                                              \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.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 n around 0

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

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

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

                                                                                                                                                    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. Applied rewrites64.2%

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

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

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

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

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

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

                                                                                                                                                          Alternative 16: 50.2% accurate, 0.5× 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)\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{\left(\left(n \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right) \cdot U\right) \cdot 2}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}\\ \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*))))))
                                                                                                                                                             (if (<= t_3 0.0)
                                                                                                                                                               (sqrt (* (* (* n (fma -2.0 t_1 t)) U) 2.0))
                                                                                                                                                               (if (<= t_3 INFINITY)
                                                                                                                                                                 (sqrt (* t_2 (fma -2.0 (* l (/ l Om)) t)))
                                                                                                                                                                 (sqrt (* (* (* n t) 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 tmp;
                                                                                                                                                          	if (t_3 <= 0.0) {
                                                                                                                                                          		tmp = sqrt((((n * fma(-2.0, t_1, t)) * U) * 2.0));
                                                                                                                                                          	} else if (t_3 <= ((double) INFINITY)) {
                                                                                                                                                          		tmp = sqrt((t_2 * fma(-2.0, (l * (l / Om)), t)));
                                                                                                                                                          	} else {
                                                                                                                                                          		tmp = sqrt((((n * t) * 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_))))
                                                                                                                                                          	tmp = 0.0
                                                                                                                                                          	if (t_3 <= 0.0)
                                                                                                                                                          		tmp = sqrt(Float64(Float64(Float64(n * fma(-2.0, t_1, t)) * U) * 2.0));
                                                                                                                                                          	elseif (t_3 <= Inf)
                                                                                                                                                          		tmp = sqrt(Float64(t_2 * fma(-2.0, Float64(l * Float64(l / Om)), t)));
                                                                                                                                                          	else
                                                                                                                                                          		tmp = sqrt(Float64(Float64(Float64(n * t) * 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]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(N[(n * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $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)\\
                                                                                                                                                          \mathbf{if}\;t\_3 \leq 0:\\
                                                                                                                                                          \;\;\;\;\sqrt{\left(\left(n \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right) \cdot U\right) \cdot 2}\\
                                                                                                                                                          
                                                                                                                                                          \mathbf{elif}\;t\_3 \leq \infty:\\
                                                                                                                                                          \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\\
                                                                                                                                                          
                                                                                                                                                          \mathbf{else}:\\
                                                                                                                                                          \;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\right) \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.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 n around 0

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

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

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

                                                                                                                                                                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. Applied rewrites64.2%

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

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

                                                                                                                                                                  Alternative 17: 37.5% accurate, 0.9× speedup?

                                                                                                                                                                  \[\begin{array}{l} \\ \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{n \cdot \left(t \cdot \left(U + U\right)\right)}\\ \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 (<=
                                                                                                                                                                        (*
                                                                                                                                                                         (* (* 2.0 n) U)
                                                                                                                                                                         (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
                                                                                                                                                                        0.0)
                                                                                                                                                                     (sqrt (* n (* t (+ U U))))
                                                                                                                                                                     (sqrt (* (* (* U n) t) 2.0))))
                                                                                                                                                                  double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                                                                                                                                  	double tmp;
                                                                                                                                                                  	if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= 0.0) {
                                                                                                                                                                  		tmp = sqrt((n * (t * (U + U))));
                                                                                                                                                                  	} 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 ((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))) <= 0.0d0) then
                                                                                                                                                                          tmp = sqrt((n * (t * (u + u))))
                                                                                                                                                                      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 ((((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((n * (t * (U + U))));
                                                                                                                                                                  	} else {
                                                                                                                                                                  		tmp = Math.sqrt((((U * n) * t) * 2.0));
                                                                                                                                                                  	}
                                                                                                                                                                  	return tmp;
                                                                                                                                                                  }
                                                                                                                                                                  
                                                                                                                                                                  def code(n, U, t, l, Om, U_42_):
                                                                                                                                                                  	tmp = 0
                                                                                                                                                                  	if (((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((n * (t * (U + U))))
                                                                                                                                                                  	else:
                                                                                                                                                                  		tmp = math.sqrt((((U * n) * t) * 2.0))
                                                                                                                                                                  	return tmp
                                                                                                                                                                  
                                                                                                                                                                  function code(n, U, t, l, Om, U_42_)
                                                                                                                                                                  	tmp = 0.0
                                                                                                                                                                  	if (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(n * Float64(t * Float64(U + U))));
                                                                                                                                                                  	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 ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_)))) <= 0.0)
                                                                                                                                                                  		tmp = sqrt((n * (t * (U + U))));
                                                                                                                                                                  	else
                                                                                                                                                                  		tmp = sqrt((((U * n) * t) * 2.0));
                                                                                                                                                                  	end
                                                                                                                                                                  	tmp_2 = tmp;
                                                                                                                                                                  end
                                                                                                                                                                  
                                                                                                                                                                  code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[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], 0.0], N[Sqrt[N[(n * N[(t * N[(U + U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
                                                                                                                                                                  
                                                                                                                                                                  \begin{array}{l}
                                                                                                                                                                  
                                                                                                                                                                  \\
                                                                                                                                                                  \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{n \cdot \left(t \cdot \left(U + U\right)\right)}\\
                                                                                                                                                                  
                                                                                                                                                                  \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 (*.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.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. Applied rewrites28.5%

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

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

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

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

                                                                                                                                                                          1. Initial program 61.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 t around inf

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

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

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

                                                                                                                                                                            Alternative 18: 38.2% accurate, 3.0× speedup?

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

                                                                                                                                                                              1. Initial program 59.7%

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

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

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

                                                                                                                                                                                if 4.80000000000000027e-46 < l < 1.0500000000000001e67

                                                                                                                                                                                1. Initial program 47.3%

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

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

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

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

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

                                                                                                                                                                                      if 1.0500000000000001e67 < l

                                                                                                                                                                                      1. Initial program 28.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 Om around 0

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

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

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

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

                                                                                                                                                                                        Alternative 19: 38.6% accurate, 3.0× speedup?

                                                                                                                                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 4.8 \cdot 10^{-46}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\ \mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+67}:\\ \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(U + U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot 2\right) \cdot n\right)}\\ \end{array} \end{array} \]
                                                                                                                                                                                        (FPCore (n U t l Om U*)
                                                                                                                                                                                         :precision binary64
                                                                                                                                                                                         (if (<= l 4.8e-46)
                                                                                                                                                                                           (sqrt (* (* (* 2.0 n) U) t))
                                                                                                                                                                                           (if (<= l 1.05e+67)
                                                                                                                                                                                             (sqrt (* n (* t (+ U U))))
                                                                                                                                                                                             (sqrt (* (* -2.0 U) (* (* (* (/ l Om) l) 2.0) n))))))
                                                                                                                                                                                        double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                                                                                                                                                        	double tmp;
                                                                                                                                                                                        	if (l <= 4.8e-46) {
                                                                                                                                                                                        		tmp = sqrt((((2.0 * n) * U) * t));
                                                                                                                                                                                        	} else if (l <= 1.05e+67) {
                                                                                                                                                                                        		tmp = sqrt((n * (t * (U + U))));
                                                                                                                                                                                        	} else {
                                                                                                                                                                                        		tmp = sqrt(((-2.0 * U) * ((((l / Om) * l) * 2.0) * n)));
                                                                                                                                                                                        	}
                                                                                                                                                                                        	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 (l <= 4.8d-46) then
                                                                                                                                                                                                tmp = sqrt((((2.0d0 * n) * u) * t))
                                                                                                                                                                                            else if (l <= 1.05d+67) then
                                                                                                                                                                                                tmp = sqrt((n * (t * (u + u))))
                                                                                                                                                                                            else
                                                                                                                                                                                                tmp = sqrt((((-2.0d0) * u) * ((((l / om) * l) * 2.0d0) * n)))
                                                                                                                                                                                            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 (l <= 4.8e-46) {
                                                                                                                                                                                        		tmp = Math.sqrt((((2.0 * n) * U) * t));
                                                                                                                                                                                        	} else if (l <= 1.05e+67) {
                                                                                                                                                                                        		tmp = Math.sqrt((n * (t * (U + U))));
                                                                                                                                                                                        	} else {
                                                                                                                                                                                        		tmp = Math.sqrt(((-2.0 * U) * ((((l / Om) * l) * 2.0) * n)));
                                                                                                                                                                                        	}
                                                                                                                                                                                        	return tmp;
                                                                                                                                                                                        }
                                                                                                                                                                                        
                                                                                                                                                                                        def code(n, U, t, l, Om, U_42_):
                                                                                                                                                                                        	tmp = 0
                                                                                                                                                                                        	if l <= 4.8e-46:
                                                                                                                                                                                        		tmp = math.sqrt((((2.0 * n) * U) * t))
                                                                                                                                                                                        	elif l <= 1.05e+67:
                                                                                                                                                                                        		tmp = math.sqrt((n * (t * (U + U))))
                                                                                                                                                                                        	else:
                                                                                                                                                                                        		tmp = math.sqrt(((-2.0 * U) * ((((l / Om) * l) * 2.0) * n)))
                                                                                                                                                                                        	return tmp
                                                                                                                                                                                        
                                                                                                                                                                                        function code(n, U, t, l, Om, U_42_)
                                                                                                                                                                                        	tmp = 0.0
                                                                                                                                                                                        	if (l <= 4.8e-46)
                                                                                                                                                                                        		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t));
                                                                                                                                                                                        	elseif (l <= 1.05e+67)
                                                                                                                                                                                        		tmp = sqrt(Float64(n * Float64(t * Float64(U + U))));
                                                                                                                                                                                        	else
                                                                                                                                                                                        		tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(Float64(Float64(Float64(l / Om) * l) * 2.0) * n)));
                                                                                                                                                                                        	end
                                                                                                                                                                                        	return tmp
                                                                                                                                                                                        end
                                                                                                                                                                                        
                                                                                                                                                                                        function tmp_2 = code(n, U, t, l, Om, U_42_)
                                                                                                                                                                                        	tmp = 0.0;
                                                                                                                                                                                        	if (l <= 4.8e-46)
                                                                                                                                                                                        		tmp = sqrt((((2.0 * n) * U) * t));
                                                                                                                                                                                        	elseif (l <= 1.05e+67)
                                                                                                                                                                                        		tmp = sqrt((n * (t * (U + U))));
                                                                                                                                                                                        	else
                                                                                                                                                                                        		tmp = sqrt(((-2.0 * U) * ((((l / Om) * l) * 2.0) * n)));
                                                                                                                                                                                        	end
                                                                                                                                                                                        	tmp_2 = tmp;
                                                                                                                                                                                        end
                                                                                                                                                                                        
                                                                                                                                                                                        code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.8e-46], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.05e+67], N[Sqrt[N[(n * N[(t * N[(U + U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * 2.0), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
                                                                                                                                                                                        
                                                                                                                                                                                        \begin{array}{l}
                                                                                                                                                                                        
                                                                                                                                                                                        \\
                                                                                                                                                                                        \begin{array}{l}
                                                                                                                                                                                        \mathbf{if}\;\ell \leq 4.8 \cdot 10^{-46}:\\
                                                                                                                                                                                        \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
                                                                                                                                                                                        
                                                                                                                                                                                        \mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+67}:\\
                                                                                                                                                                                        \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(U + U\right)\right)}\\
                                                                                                                                                                                        
                                                                                                                                                                                        \mathbf{else}:\\
                                                                                                                                                                                        \;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot 2\right) \cdot n\right)}\\
                                                                                                                                                                                        
                                                                                                                                                                                        
                                                                                                                                                                                        \end{array}
                                                                                                                                                                                        \end{array}
                                                                                                                                                                                        
                                                                                                                                                                                        Derivation
                                                                                                                                                                                        1. Split input into 3 regimes
                                                                                                                                                                                        2. if l < 4.80000000000000027e-46

                                                                                                                                                                                          1. Initial program 59.7%

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

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

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

                                                                                                                                                                                            if 4.80000000000000027e-46 < l < 1.0500000000000001e67

                                                                                                                                                                                            1. Initial program 47.3%

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

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

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

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

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

                                                                                                                                                                                                  if 1.0500000000000001e67 < l

                                                                                                                                                                                                  1. Initial program 28.6%

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

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

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

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

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

                                                                                                                                                                                                    Alternative 20: 36.8% accurate, 3.0× speedup?

                                                                                                                                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 4.8 \cdot 10^{-46}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\ \mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+67}:\\ \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(U + U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(U \cdot 2\right) \cdot \left(\left(-2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{n}{Om}\right)}\\ \end{array} \end{array} \]
                                                                                                                                                                                                    (FPCore (n U t l Om U*)
                                                                                                                                                                                                     :precision binary64
                                                                                                                                                                                                     (if (<= l 4.8e-46)
                                                                                                                                                                                                       (sqrt (* (* (* 2.0 n) U) t))
                                                                                                                                                                                                       (if (<= l 1.05e+67)
                                                                                                                                                                                                         (sqrt (* n (* t (+ U U))))
                                                                                                                                                                                                         (sqrt (* (* U 2.0) (* (* -2.0 (* l l)) (/ n Om)))))))
                                                                                                                                                                                                    double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                                                                                                                                                                    	double tmp;
                                                                                                                                                                                                    	if (l <= 4.8e-46) {
                                                                                                                                                                                                    		tmp = sqrt((((2.0 * n) * U) * t));
                                                                                                                                                                                                    	} else if (l <= 1.05e+67) {
                                                                                                                                                                                                    		tmp = sqrt((n * (t * (U + U))));
                                                                                                                                                                                                    	} else {
                                                                                                                                                                                                    		tmp = sqrt(((U * 2.0) * ((-2.0 * (l * l)) * (n / Om))));
                                                                                                                                                                                                    	}
                                                                                                                                                                                                    	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 (l <= 4.8d-46) then
                                                                                                                                                                                                            tmp = sqrt((((2.0d0 * n) * u) * t))
                                                                                                                                                                                                        else if (l <= 1.05d+67) then
                                                                                                                                                                                                            tmp = sqrt((n * (t * (u + u))))
                                                                                                                                                                                                        else
                                                                                                                                                                                                            tmp = sqrt(((u * 2.0d0) * (((-2.0d0) * (l * l)) * (n / om))))
                                                                                                                                                                                                        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 (l <= 4.8e-46) {
                                                                                                                                                                                                    		tmp = Math.sqrt((((2.0 * n) * U) * t));
                                                                                                                                                                                                    	} else if (l <= 1.05e+67) {
                                                                                                                                                                                                    		tmp = Math.sqrt((n * (t * (U + U))));
                                                                                                                                                                                                    	} else {
                                                                                                                                                                                                    		tmp = Math.sqrt(((U * 2.0) * ((-2.0 * (l * l)) * (n / Om))));
                                                                                                                                                                                                    	}
                                                                                                                                                                                                    	return tmp;
                                                                                                                                                                                                    }
                                                                                                                                                                                                    
                                                                                                                                                                                                    def code(n, U, t, l, Om, U_42_):
                                                                                                                                                                                                    	tmp = 0
                                                                                                                                                                                                    	if l <= 4.8e-46:
                                                                                                                                                                                                    		tmp = math.sqrt((((2.0 * n) * U) * t))
                                                                                                                                                                                                    	elif l <= 1.05e+67:
                                                                                                                                                                                                    		tmp = math.sqrt((n * (t * (U + U))))
                                                                                                                                                                                                    	else:
                                                                                                                                                                                                    		tmp = math.sqrt(((U * 2.0) * ((-2.0 * (l * l)) * (n / Om))))
                                                                                                                                                                                                    	return tmp
                                                                                                                                                                                                    
                                                                                                                                                                                                    function code(n, U, t, l, Om, U_42_)
                                                                                                                                                                                                    	tmp = 0.0
                                                                                                                                                                                                    	if (l <= 4.8e-46)
                                                                                                                                                                                                    		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t));
                                                                                                                                                                                                    	elseif (l <= 1.05e+67)
                                                                                                                                                                                                    		tmp = sqrt(Float64(n * Float64(t * Float64(U + U))));
                                                                                                                                                                                                    	else
                                                                                                                                                                                                    		tmp = sqrt(Float64(Float64(U * 2.0) * Float64(Float64(-2.0 * Float64(l * l)) * Float64(n / Om))));
                                                                                                                                                                                                    	end
                                                                                                                                                                                                    	return tmp
                                                                                                                                                                                                    end
                                                                                                                                                                                                    
                                                                                                                                                                                                    function tmp_2 = code(n, U, t, l, Om, U_42_)
                                                                                                                                                                                                    	tmp = 0.0;
                                                                                                                                                                                                    	if (l <= 4.8e-46)
                                                                                                                                                                                                    		tmp = sqrt((((2.0 * n) * U) * t));
                                                                                                                                                                                                    	elseif (l <= 1.05e+67)
                                                                                                                                                                                                    		tmp = sqrt((n * (t * (U + U))));
                                                                                                                                                                                                    	else
                                                                                                                                                                                                    		tmp = sqrt(((U * 2.0) * ((-2.0 * (l * l)) * (n / Om))));
                                                                                                                                                                                                    	end
                                                                                                                                                                                                    	tmp_2 = tmp;
                                                                                                                                                                                                    end
                                                                                                                                                                                                    
                                                                                                                                                                                                    code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.8e-46], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.05e+67], N[Sqrt[N[(n * N[(t * N[(U + U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * 2.0), $MachinePrecision] * N[(N[(-2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
                                                                                                                                                                                                    
                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                    
                                                                                                                                                                                                    \\
                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                    \mathbf{if}\;\ell \leq 4.8 \cdot 10^{-46}:\\
                                                                                                                                                                                                    \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
                                                                                                                                                                                                    
                                                                                                                                                                                                    \mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+67}:\\
                                                                                                                                                                                                    \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(U + U\right)\right)}\\
                                                                                                                                                                                                    
                                                                                                                                                                                                    \mathbf{else}:\\
                                                                                                                                                                                                    \;\;\;\;\sqrt{\left(U \cdot 2\right) \cdot \left(\left(-2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{n}{Om}\right)}\\
                                                                                                                                                                                                    
                                                                                                                                                                                                    
                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                    
                                                                                                                                                                                                    Derivation
                                                                                                                                                                                                    1. Split input into 3 regimes
                                                                                                                                                                                                    2. if l < 4.80000000000000027e-46

                                                                                                                                                                                                      1. Initial program 59.7%

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

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

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

                                                                                                                                                                                                        if 4.80000000000000027e-46 < l < 1.0500000000000001e67

                                                                                                                                                                                                        1. Initial program 47.3%

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

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

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

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

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

                                                                                                                                                                                                              if 1.0500000000000001e67 < l

                                                                                                                                                                                                              1. Initial program 28.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 0

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

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

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

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

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

                                                                                                                                                                                                                  Alternative 21: 37.0% accurate, 3.3× speedup?

                                                                                                                                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 4.8 \cdot 10^{-46}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\ \mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+67}:\\ \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(U + U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot U}{Om} \cdot -4}\\ \end{array} \end{array} \]
                                                                                                                                                                                                                  (FPCore (n U t l Om U*)
                                                                                                                                                                                                                   :precision binary64
                                                                                                                                                                                                                   (if (<= l 4.8e-46)
                                                                                                                                                                                                                     (sqrt (* (* (* 2.0 n) U) t))
                                                                                                                                                                                                                     (if (<= l 1.05e+67)
                                                                                                                                                                                                                       (sqrt (* n (* t (+ U U))))
                                                                                                                                                                                                                       (sqrt (* (/ (* (* (* l l) n) U) Om) -4.0)))))
                                                                                                                                                                                                                  double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                                                                                                                                                                                  	double tmp;
                                                                                                                                                                                                                  	if (l <= 4.8e-46) {
                                                                                                                                                                                                                  		tmp = sqrt((((2.0 * n) * U) * t));
                                                                                                                                                                                                                  	} else if (l <= 1.05e+67) {
                                                                                                                                                                                                                  		tmp = sqrt((n * (t * (U + U))));
                                                                                                                                                                                                                  	} else {
                                                                                                                                                                                                                  		tmp = sqrt((((((l * l) * n) * U) / Om) * -4.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 (l <= 4.8d-46) then
                                                                                                                                                                                                                          tmp = sqrt((((2.0d0 * n) * u) * t))
                                                                                                                                                                                                                      else if (l <= 1.05d+67) then
                                                                                                                                                                                                                          tmp = sqrt((n * (t * (u + u))))
                                                                                                                                                                                                                      else
                                                                                                                                                                                                                          tmp = sqrt((((((l * l) * n) * u) / om) * (-4.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 (l <= 4.8e-46) {
                                                                                                                                                                                                                  		tmp = Math.sqrt((((2.0 * n) * U) * t));
                                                                                                                                                                                                                  	} else if (l <= 1.05e+67) {
                                                                                                                                                                                                                  		tmp = Math.sqrt((n * (t * (U + U))));
                                                                                                                                                                                                                  	} else {
                                                                                                                                                                                                                  		tmp = Math.sqrt((((((l * l) * n) * U) / Om) * -4.0));
                                                                                                                                                                                                                  	}
                                                                                                                                                                                                                  	return tmp;
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  def code(n, U, t, l, Om, U_42_):
                                                                                                                                                                                                                  	tmp = 0
                                                                                                                                                                                                                  	if l <= 4.8e-46:
                                                                                                                                                                                                                  		tmp = math.sqrt((((2.0 * n) * U) * t))
                                                                                                                                                                                                                  	elif l <= 1.05e+67:
                                                                                                                                                                                                                  		tmp = math.sqrt((n * (t * (U + U))))
                                                                                                                                                                                                                  	else:
                                                                                                                                                                                                                  		tmp = math.sqrt((((((l * l) * n) * U) / Om) * -4.0))
                                                                                                                                                                                                                  	return tmp
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  function code(n, U, t, l, Om, U_42_)
                                                                                                                                                                                                                  	tmp = 0.0
                                                                                                                                                                                                                  	if (l <= 4.8e-46)
                                                                                                                                                                                                                  		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t));
                                                                                                                                                                                                                  	elseif (l <= 1.05e+67)
                                                                                                                                                                                                                  		tmp = sqrt(Float64(n * Float64(t * Float64(U + U))));
                                                                                                                                                                                                                  	else
                                                                                                                                                                                                                  		tmp = sqrt(Float64(Float64(Float64(Float64(Float64(l * l) * n) * U) / Om) * -4.0));
                                                                                                                                                                                                                  	end
                                                                                                                                                                                                                  	return tmp
                                                                                                                                                                                                                  end
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  function tmp_2 = code(n, U, t, l, Om, U_42_)
                                                                                                                                                                                                                  	tmp = 0.0;
                                                                                                                                                                                                                  	if (l <= 4.8e-46)
                                                                                                                                                                                                                  		tmp = sqrt((((2.0 * n) * U) * t));
                                                                                                                                                                                                                  	elseif (l <= 1.05e+67)
                                                                                                                                                                                                                  		tmp = sqrt((n * (t * (U + U))));
                                                                                                                                                                                                                  	else
                                                                                                                                                                                                                  		tmp = sqrt((((((l * l) * n) * U) / Om) * -4.0));
                                                                                                                                                                                                                  	end
                                                                                                                                                                                                                  	tmp_2 = tmp;
                                                                                                                                                                                                                  end
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.8e-46], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.05e+67], N[Sqrt[N[(n * N[(t * N[(U + U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0), $MachinePrecision]], $MachinePrecision]]]
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  \begin{array}{l}
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  \\
                                                                                                                                                                                                                  \begin{array}{l}
                                                                                                                                                                                                                  \mathbf{if}\;\ell \leq 4.8 \cdot 10^{-46}:\\
                                                                                                                                                                                                                  \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  \mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+67}:\\
                                                                                                                                                                                                                  \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(U + U\right)\right)}\\
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  \mathbf{else}:\\
                                                                                                                                                                                                                  \;\;\;\;\sqrt{\frac{\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot U}{Om} \cdot -4}\\
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  \end{array}
                                                                                                                                                                                                                  \end{array}
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  Derivation
                                                                                                                                                                                                                  1. Split input into 3 regimes
                                                                                                                                                                                                                  2. if l < 4.80000000000000027e-46

                                                                                                                                                                                                                    1. Initial program 59.7%

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

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

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

                                                                                                                                                                                                                      if 4.80000000000000027e-46 < l < 1.0500000000000001e67

                                                                                                                                                                                                                      1. Initial program 47.3%

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

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

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

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

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

                                                                                                                                                                                                                            if 1.0500000000000001e67 < l

                                                                                                                                                                                                                            1. Initial program 28.6%

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

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

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

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

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

                                                                                                                                                                                                                              Alternative 22: 47.3% accurate, 3.3× speedup?

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

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

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

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

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

                                                                                                                                                                                                                                    if -2.00000000000000009e42 < U

                                                                                                                                                                                                                                    1. Initial program 48.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{\color{blue}{n \cdot \left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)}{{Om}^{2}} + 2 \cdot \left(U \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
                                                                                                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                                                                                                      1. Applied rewrites44.1%

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

                                                                                                                                                                                                                                        \[\leadsto \sqrt{\left(2 \cdot \left(U \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right) \cdot n} \]
                                                                                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                                                                                        1. Applied rewrites48.4%

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

                                                                                                                                                                                                                                      Alternative 23: 44.9% accurate, 3.3× speedup?

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

                                                                                                                                                                                                                                        1. Initial program 58.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 0

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

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

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

                                                                                                                                                                                                                                            if 1.35000000000000003e154 < l

                                                                                                                                                                                                                                            1. Initial program 11.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 Om around 0

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

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

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

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

                                                                                                                                                                                                                                              Alternative 24: 35.7% accurate, 5.6× speedup?

                                                                                                                                                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;n \leq 1.5 \cdot 10^{-109}:\\ \;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\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 (<= n 1.5e-109)
                                                                                                                                                                                                                                                 (sqrt (* (* (* n t) U) 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 (n <= 1.5e-109) {
                                                                                                                                                                                                                                              		tmp = sqrt((((n * t) * U) * 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 (n <= 1.5d-109) then
                                                                                                                                                                                                                                                      tmp = sqrt((((n * t) * u) * 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 (n <= 1.5e-109) {
                                                                                                                                                                                                                                              		tmp = Math.sqrt((((n * t) * U) * 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 n <= 1.5e-109:
                                                                                                                                                                                                                                              		tmp = math.sqrt((((n * t) * U) * 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 (n <= 1.5e-109)
                                                                                                                                                                                                                                              		tmp = sqrt(Float64(Float64(Float64(n * t) * U) * 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 (n <= 1.5e-109)
                                                                                                                                                                                                                                              		tmp = sqrt((((n * t) * U) * 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, 1.5e-109], N[Sqrt[N[(N[(N[(n * t), $MachinePrecision] * U), $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}\;n \leq 1.5 \cdot 10^{-109}:\\
                                                                                                                                                                                                                                              \;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\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 n < 1.50000000000000011e-109

                                                                                                                                                                                                                                                1. Initial program 51.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. Applied rewrites40.6%

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

                                                                                                                                                                                                                                                  if 1.50000000000000011e-109 < n

                                                                                                                                                                                                                                                  1. Initial program 54.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. Applied rewrites28.7%

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

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

                                                                                                                                                                                                                                                    Alternative 25: 34.5% accurate, 7.4× speedup?

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

                                                                                                                                                                                                                                                      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                                                                                                                                                                                                                                    2. 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. Applied rewrites37.0%

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

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

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

                                                                                                                                                                                                                                                          Alternative 26: 5.8% accurate, 8.5× speedup?

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

                                                                                                                                                                                                                                                            \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
                                                                                                                                                                                                                                                          2. 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. Applied rewrites37.0%

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

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

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

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

                                                                                                                                                                                                                                                                  Reproduce

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