Toniolo and Linder, Equation (13)

Percentage Accurate: 50.0% → 63.2%
Time: 11.1s
Alternatives: 10
Speedup: N/A×

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

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

Initial Program: 50.0% 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: 63.2% accurate, N/A× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+154}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;{2}^{0.5} \cdot {\left(\left(t\_1 \cdot n\right) \cdot U\right)}^{0.5}\\


\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*))))) < 1.99999999999999996e-149

    1. Initial program 17.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. Applied rewrites47.6%

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

    if 1.99999999999999996e-149 < (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*))))) < 2.00000000000000007e154

    1. Initial program 99.1%

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

    if 2.00000000000000007e154 < (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 25.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. *-commutativeN/A

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

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

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

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

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

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

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

Alternative 2: 63.0% accurate, N/A× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+154}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;{2}^{0.5} \cdot {\left(\left(t\_1 \cdot n\right) \cdot U\right)}^{0.5}\\


\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*))))) < 4.99999999999999957e-146

    1. Initial program 20.2%

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

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

    if 4.99999999999999957e-146 < (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*))))) < 2.00000000000000007e154

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

    if 2.00000000000000007e154 < (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 25.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. *-commutativeN/A

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

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

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

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

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

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

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

Alternative 3: 59.7% accurate, N/A× speedup?

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

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

\mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{t\_4 \cdot \left(t - \mathsf{fma}\left(-1, \frac{U*}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}, t\_1\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;{2}^{0.5} \cdot {\left(\left(t\_2 \cdot n\right) \cdot U\right)}^{0.5}\\


\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*))))) < 4.00000000000000009e64

    1. Initial program 73.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. Applied rewrites78.3%

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

    if 4.00000000000000009e64 < (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*))))) < 2.00000000000000007e154

    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. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000007e154 < (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 25.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. *-commutativeN/A

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

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

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

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

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

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

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

Alternative 4: 58.0% accurate, N/A× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;{2}^{0.5} \cdot {\left(\left(t\_1 \cdot n\right) \cdot U\right)}^{0.5}\\


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

    1. Initial program 76.6%

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

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

    if 2e94 < (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 33.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 \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. *-commutativeN/A

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

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

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

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

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

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

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

Alternative 5: 57.6% accurate, N/A× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;e^{\log 2 \cdot 0.5} \cdot \left({t\_1}^{0.5} \cdot {U}^{0.5}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 9.9999999999999996e-303

    1. Initial program 53.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. *-commutativeN/A

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

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

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

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

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

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

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

    if 9.9999999999999996e-303 < U

    1. Initial program 57.1%

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

      \[\leadsto \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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log 2 \cdot \frac{1}{2}} \cdot {\left(\color{blue}{\left(\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) \cdot n\right)} \cdot U\right)}^{\frac{1}{2}} \]
      5. lower-log.f6462.0

        \[\leadsto e^{\log 2 \cdot 0.5} \cdot {\left(\left(\color{blue}{\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)} \cdot n\right) \cdot U\right)}^{0.5} \]
    7. Applied rewrites62.0%

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

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

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

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

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

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

        \[\leadsto e^{\log 2 \cdot \frac{1}{2}} \cdot {\left(\left(\left(-2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + t\right) \cdot n\right) \cdot U\right)}^{\frac{1}{2}} \]
      7. unpow-prod-downN/A

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

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

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

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

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

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

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

        \[\leadsto e^{\log 2 \cdot \frac{1}{2}} \cdot \left({\left(\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) \cdot n\right)}^{\frac{1}{2}} \cdot \sqrt{U}\right) \]
      15. pow1/2N/A

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

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

Alternative 6: 57.6% accurate, N/A× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) \cdot n\\ t_2 := e^{\log 2 \cdot 0.5}\\ \mathbf{if}\;U \leq 4.3 \cdot 10^{-307}:\\ \;\;\;\;t\_2 \cdot {\left(t\_1 \cdot U\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \left({t\_1}^{0.5} \cdot {U}^{0.5}\right)\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* (fma -2.0 (* l (/ l Om)) t) n)) (t_2 (exp (* (log 2.0) 0.5))))
   (if (<= U 4.3e-307)
     (* t_2 (pow (* t_1 U) 0.5))
     (* t_2 (* (pow t_1 0.5) (pow U 0.5))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = fma(-2.0, (l * (l / Om)), t) * n;
	double t_2 = exp((log(2.0) * 0.5));
	double tmp;
	if (U <= 4.3e-307) {
		tmp = t_2 * pow((t_1 * U), 0.5);
	} else {
		tmp = t_2 * (pow(t_1, 0.5) * pow(U, 0.5));
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(fma(-2.0, Float64(l * Float64(l / Om)), t) * n)
	t_2 = exp(Float64(log(2.0) * 0.5))
	tmp = 0.0
	if (U <= 4.3e-307)
		tmp = Float64(t_2 * (Float64(t_1 * U) ^ 0.5));
	else
		tmp = Float64(t_2 * Float64((t_1 ^ 0.5) * (U ^ 0.5)));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[Log[2.0], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[U, 4.3e-307], N[(t$95$2 * N[Power[N[(t$95$1 * U), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(N[Power[t$95$1, 0.5], $MachinePrecision] * N[Power[U, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) \cdot n\\
t_2 := e^{\log 2 \cdot 0.5}\\
\mathbf{if}\;U \leq 4.3 \cdot 10^{-307}:\\
\;\;\;\;t\_2 \cdot {\left(t\_1 \cdot U\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left({t\_1}^{0.5} \cdot {U}^{0.5}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 4.3000000000000001e-307

    1. Initial program 54.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 \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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log 2 \cdot \frac{1}{2}} \cdot {\left(\color{blue}{\left(\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) \cdot n\right)} \cdot U\right)}^{\frac{1}{2}} \]
      5. lower-log.f6457.3

        \[\leadsto e^{\log 2 \cdot 0.5} \cdot {\left(\left(\color{blue}{\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)} \cdot n\right) \cdot U\right)}^{0.5} \]
    7. Applied rewrites57.3%

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

    if 4.3000000000000001e-307 < U

    1. Initial program 56.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 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log 2 \cdot 0.5} \cdot {\left(\left(\color{blue}{\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)} \cdot n\right) \cdot U\right)}^{0.5} \]
    7. Applied rewrites61.8%

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

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

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

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

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

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

        \[\leadsto e^{\log 2 \cdot \frac{1}{2}} \cdot {\left(\left(\left(-2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + t\right) \cdot n\right) \cdot U\right)}^{\frac{1}{2}} \]
      7. unpow-prod-downN/A

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

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

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

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

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

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

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

        \[\leadsto e^{\log 2 \cdot \frac{1}{2}} \cdot \left({\left(\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) \cdot n\right)}^{\frac{1}{2}} \cdot \sqrt{U}\right) \]
      15. pow1/2N/A

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

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

Alternative 7: 37.9% accurate, N/A× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;U \leq 1.35 \cdot 10^{-303}:\\ \;\;\;\;\left(\frac{\ell \cdot n}{Om} \cdot {\left(U \cdot U*\right)}^{0.5}\right) \cdot {2}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;e^{\log 2 \cdot 0.5} \cdot \left({\left(\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) \cdot n\right)}^{0.5} \cdot {U}^{0.5}\right)\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= U 1.35e-303)
   (* (* (/ (* l n) Om) (pow (* U U*) 0.5)) (pow 2.0 0.5))
   (*
    (exp (* (log 2.0) 0.5))
    (* (pow (* (fma -2.0 (* l (/ l Om)) t) n) 0.5) (pow U 0.5)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= 1.35e-303) {
		tmp = (((l * n) / Om) * pow((U * U_42_), 0.5)) * pow(2.0, 0.5);
	} else {
		tmp = exp((log(2.0) * 0.5)) * (pow((fma(-2.0, (l * (l / Om)), t) * n), 0.5) * pow(U, 0.5));
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (U <= 1.35e-303)
		tmp = Float64(Float64(Float64(Float64(l * n) / Om) * (Float64(U * U_42_) ^ 0.5)) * (2.0 ^ 0.5));
	else
		tmp = Float64(exp(Float64(log(2.0) * 0.5)) * Float64((Float64(fma(-2.0, Float64(l * Float64(l / Om)), t) * n) ^ 0.5) * (U ^ 0.5)));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 1.35e-303], N[(N[(N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision] * N[Power[N[(U * U$42$), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[Log[2.0], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[(N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[U, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.35 \cdot 10^{-303}:\\
\;\;\;\;\left(\frac{\ell \cdot n}{Om} \cdot {\left(U \cdot U*\right)}^{0.5}\right) \cdot {2}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;e^{\log 2 \cdot 0.5} \cdot \left({\left(\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) \cdot n\right)}^{0.5} \cdot {U}^{0.5}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 1.34999999999999993e-303

    1. Initial program 54.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{\ell \cdot n}{Om} \cdot {\left(U \cdot U*\right)}^{\frac{1}{2}}\right) \cdot {2}^{\frac{1}{2}} \]
      6. lower-*.f6414.3

        \[\leadsto \left(\frac{\ell \cdot n}{Om} \cdot {\left(U \cdot U*\right)}^{0.5}\right) \cdot {2}^{0.5} \]
    11. Applied rewrites14.3%

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

    if 1.34999999999999993e-303 < U

    1. Initial program 56.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 \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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log 2 \cdot 0.5} \cdot {\left(\left(\color{blue}{\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)} \cdot n\right) \cdot U\right)}^{0.5} \]
    7. Applied rewrites62.3%

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

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

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

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

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

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

        \[\leadsto e^{\log 2 \cdot \frac{1}{2}} \cdot {\left(\left(\left(-2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + t\right) \cdot n\right) \cdot U\right)}^{\frac{1}{2}} \]
      7. unpow-prod-downN/A

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

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

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

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

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

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

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

        \[\leadsto e^{\log 2 \cdot \frac{1}{2}} \cdot \left({\left(\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) \cdot n\right)}^{\frac{1}{2}} \cdot \sqrt{U}\right) \]
      15. pow1/2N/A

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

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

Alternative 8: 13.2% accurate, N/A× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot \mathsf{fma}\left(-1, \left(Om \cdot {2}^{0.5}\right) \cdot {\left(\frac{U}{U*}\right)}^{0.5}, {\left(U \cdot U*\right)}^{0.5} \cdot t\_1\right)}{Om}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -4.69999999999999974e50

    1. Initial program 63.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{U \cdot \mathsf{fma}\left(-1, \left(Om \cdot \left(\ell \cdot {2}^{0.5}\right)\right) \cdot {\left({\left(U \cdot U*\right)}^{-1}\right)}^{0.5}, {\left(\frac{U*}{U}\right)}^{0.5} \cdot \left(\ell \cdot \left(n \cdot {2}^{0.5}\right)\right)\right)}{Om} \]

    if -4.69999999999999974e50 < n

    1. Initial program 53.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\ell \cdot \mathsf{fma}\left(-1, \left(Om \cdot {2}^{\frac{1}{2}}\right) \cdot {\left(\frac{U}{U*}\right)}^{\frac{1}{2}}, {\left(U \cdot U*\right)}^{\frac{1}{2}} \cdot \left(n \cdot {2}^{\frac{1}{2}}\right)\right)}{Om} \]
      16. lift-*.f6412.0

        \[\leadsto \frac{\ell \cdot \mathsf{fma}\left(-1, \left(Om \cdot {2}^{0.5}\right) \cdot {\left(\frac{U}{U*}\right)}^{0.5}, {\left(U \cdot U*\right)}^{0.5} \cdot \left(n \cdot {2}^{0.5}\right)\right)}{Om} \]
    14. Applied rewrites12.0%

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

Alternative 9: 10.8% accurate, N/A× speedup?

\[\begin{array}{l} \\ \frac{U \cdot \mathsf{fma}\left(-1, \left(Om \cdot \left(\ell \cdot {2}^{0.5}\right)\right) \cdot {\left({\left(U \cdot U*\right)}^{-1}\right)}^{0.5}, {\left(\frac{U*}{U}\right)}^{0.5} \cdot \left(\ell \cdot \left(n \cdot {2}^{0.5}\right)\right)\right)}{Om} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (/
  (*
   U
   (fma
    -1.0
    (* (* Om (* l (pow 2.0 0.5))) (pow (pow (* U U*) -1.0) 0.5))
    (* (pow (/ U* U) 0.5) (* l (* n (pow 2.0 0.5))))))
  Om))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return (U * fma(-1.0, ((Om * (l * pow(2.0, 0.5))) * pow(pow((U * U_42_), -1.0), 0.5)), (pow((U_42_ / U), 0.5) * (l * (n * pow(2.0, 0.5)))))) / Om;
}
function code(n, U, t, l, Om, U_42_)
	return Float64(Float64(U * fma(-1.0, Float64(Float64(Om * Float64(l * (2.0 ^ 0.5))) * ((Float64(U * U_42_) ^ -1.0) ^ 0.5)), Float64((Float64(U_42_ / U) ^ 0.5) * Float64(l * Float64(n * (2.0 ^ 0.5)))))) / Om)
end
code[n_, U_, t_, l_, Om_, U$42$_] := N[(N[(U * N[(-1.0 * N[(N[(Om * N[(l * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[N[(U * U$42$), $MachinePrecision], -1.0], $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(U$42$ / U), $MachinePrecision], 0.5], $MachinePrecision] * N[(l * N[(n * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]
\begin{array}{l}

\\
\frac{U \cdot \mathsf{fma}\left(-1, \left(Om \cdot \left(\ell \cdot {2}^{0.5}\right)\right) \cdot {\left({\left(U \cdot U*\right)}^{-1}\right)}^{0.5}, {\left(\frac{U*}{U}\right)}^{0.5} \cdot \left(\ell \cdot \left(n \cdot {2}^{0.5}\right)\right)\right)}{Om}
\end{array}
Derivation
  1. Initial program 55.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 \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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{-1 \cdot \left(\left(Om \cdot \left(\ell \cdot \sqrt{2}\right)\right) \cdot \sqrt{\frac{U}{U*}}\right) + \sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(n \cdot \sqrt{2}\right)\right)}{Om} \]
  11. Applied rewrites12.8%

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

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

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

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

    \[\leadsto \frac{U \cdot \mathsf{fma}\left(-1, \left(Om \cdot \left(\ell \cdot {2}^{0.5}\right)\right) \cdot {\left({\left(U \cdot U*\right)}^{-1}\right)}^{0.5}, {\left(\frac{U*}{U}\right)}^{0.5} \cdot \left(\ell \cdot \left(n \cdot {2}^{0.5}\right)\right)\right)}{Om} \]
  15. Add Preprocessing

Alternative 10: 10.7% accurate, N/A× speedup?

\[\begin{array}{l} \\ U* \cdot \mathsf{fma}\left(-1, {\left(\frac{U}{\left(U* \cdot U*\right) \cdot U*}\right)}^{0.5} \cdot \left(\ell \cdot {2}^{0.5}\right), \frac{\ell \cdot \left(n \cdot {2}^{0.5}\right)}{Om} \cdot {\left(\frac{U}{U*}\right)}^{0.5}\right) \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (*
  U*
  (fma
   -1.0
   (* (pow (/ U (* (* U* U*) U*)) 0.5) (* l (pow 2.0 0.5)))
   (* (/ (* l (* n (pow 2.0 0.5))) Om) (pow (/ U U*) 0.5)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return U_42_ * fma(-1.0, (pow((U / ((U_42_ * U_42_) * U_42_)), 0.5) * (l * pow(2.0, 0.5))), (((l * (n * pow(2.0, 0.5))) / Om) * pow((U / U_42_), 0.5)));
}
function code(n, U, t, l, Om, U_42_)
	return Float64(U_42_ * fma(-1.0, Float64((Float64(U / Float64(Float64(U_42_ * U_42_) * U_42_)) ^ 0.5) * Float64(l * (2.0 ^ 0.5))), Float64(Float64(Float64(l * Float64(n * (2.0 ^ 0.5))) / Om) * (Float64(U / U_42_) ^ 0.5))))
end
code[n_, U_, t_, l_, Om_, U$42$_] := N[(U$42$ * N[(-1.0 * N[(N[Power[N[(U / N[(N[(U$42$ * U$42$), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[(l * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(l * N[(n * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[Power[N[(U / U$42$), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
U* \cdot \mathsf{fma}\left(-1, {\left(\frac{U}{\left(U* \cdot U*\right) \cdot U*}\right)}^{0.5} \cdot \left(\ell \cdot {2}^{0.5}\right), \frac{\ell \cdot \left(n \cdot {2}^{0.5}\right)}{Om} \cdot {\left(\frac{U}{U*}\right)}^{0.5}\right)
\end{array}
Derivation
  1. Initial program 55.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 \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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{-1 \cdot \left(\left(Om \cdot \left(\ell \cdot \sqrt{2}\right)\right) \cdot \sqrt{\frac{U}{U*}}\right) + \sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(n \cdot \sqrt{2}\right)\right)}{Om} \]
  11. Applied rewrites12.8%

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

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

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

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

    \[\leadsto U* \cdot \mathsf{fma}\left(-1, \color{blue}{{\left(\frac{U}{\left(U* \cdot U*\right) \cdot U*}\right)}^{0.5} \cdot \left(\ell \cdot {2}^{0.5}\right)}, \frac{\ell \cdot \left(n \cdot {2}^{0.5}\right)}{Om} \cdot {\left(\frac{U}{U*}\right)}^{0.5}\right) \]
  15. Add Preprocessing

Reproduce

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