
(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:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U U*)))))))
(if (<= t_2 0.0)
(sqrt
(*
(* (- (fma (* (/ l Om) -2.0) l t) (* (* (- U U*) n) t_1)) (* 2.0 n))
U))
(if (<= t_2 1e+154)
t_2
(sqrt
(*
(* (* (* -2.0 U) l) (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n))
l))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * t_1) * (U - U_42_)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((((fma(((l / Om) * -2.0), l, t) - (((U - U_42_) * n) * t_1)) * (2.0 * n)) * U));
} else if (t_2 <= 1e+154) {
tmp = t_2;
} else {
tmp = sqrt(((((-2.0 * U) * l) * ((fma((n / Om), (U - U_42_), 2.0) / Om) * n)) * l));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Om) ^ 2.0 t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * t_1) * Float64(U - U_42_))))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) - Float64(Float64(Float64(U - U_42_) * n) * t_1)) * Float64(2.0 * n)) * U)); elseif (t_2 <= 1e+154) tmp = t_2; else tmp = sqrt(Float64(Float64(Float64(Float64(-2.0 * U) * l) * Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n)) * l)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * t$95$1), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] - N[(N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 1e+154], t$95$2, N[Sqrt[N[(N[(N[(N[(-2.0 * U), $MachinePrecision] * l), $MachinePrecision] * N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot t\_1\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) - \left(\left(U - U*\right) \cdot n\right) \cdot t\_1\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{elif}\;t\_2 \leq 10^{+154}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(\left(-2 \cdot U\right) \cdot \ell\right) \cdot \left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right)\right) \cdot \ell}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 13.6%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6413.6
lift-*.f64N/A
Applied rewrites13.6%
Applied rewrites46.2%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 1.00000000000000004e154Initial program 96.3%
if 1.00000000000000004e154 < (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*))))) Initial program 18.1%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6429.2
Applied rewrites29.2%
Applied rewrites39.2%
Applied rewrites46.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 0.0)
(sqrt (* (* (* U t) n) 2.0))
(if (<= t_3 4e+302)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(if (<= t_3 INFINITY)
(sqrt (* (* (* (fma (* (/ l Om) -2.0) l t) n) U) 2.0))
(sqrt (* t_2 (/ (* U* (* (* l l) n)) (* Om Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((((U * t) * n) * 2.0));
} else if (t_3 <= 4e+302) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((((fma(((l / Om) * -2.0), l, t) * n) * U) * 2.0));
} else {
tmp = sqrt((t_2 * ((U_42_ * ((l * l) * n)) / (Om * Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); elseif (t_3 <= 4e+302) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) * n) * U) * 2.0)); else tmp = sqrt(Float64(t_2 * Float64(Float64(U_42_ * Float64(Float64(l * l) * n)) / Float64(Om * Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 4e+302], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$2 * N[(N[(U$42$ * N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+302}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_2 \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot Om}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 12.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Applied rewrites39.4%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 4.0000000000000003e302Initial program 96.3%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6489.4
Applied rewrites89.4%
if 4.0000000000000003e302 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 29.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6426.4
Applied rewrites26.4%
Applied rewrites35.9%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Taylor expanded in Om around -inf
+-commutativeN/A
lower-+.f64N/A
Applied rewrites32.7%
Taylor expanded in U* around inf
Applied rewrites32.1%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 0.0)
(sqrt (* (* (* U t) n) 2.0))
(if (<= t_3 4e+302)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(if (<= t_3 INFINITY)
(sqrt (* (* (* (fma (* (/ l Om) -2.0) l t) n) U) 2.0))
(sqrt (* 2.0 (/ (* (* U U*) (* (* l l) (* n n))) (* Om Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((((U * t) * n) * 2.0));
} else if (t_3 <= 4e+302) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((((fma(((l / Om) * -2.0), l, t) * n) * U) * 2.0));
} else {
tmp = sqrt((2.0 * (((U * U_42_) * ((l * l) * (n * n))) / (Om * Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); elseif (t_3 <= 4e+302) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) * n) * U) * 2.0)); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * U_42_) * Float64(Float64(l * l) * Float64(n * n))) / Float64(Om * Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 4e+302], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(U * U$42$), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+302}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot U*\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot n\right)\right)}{Om \cdot Om}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 12.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Applied rewrites39.4%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 4.0000000000000003e302Initial program 96.3%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6489.4
Applied rewrites89.4%
if 4.0000000000000003e302 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 29.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6426.4
Applied rewrites26.4%
Applied rewrites35.9%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Taylor expanded in n around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6428.8
Applied rewrites28.8%
Taylor expanded in U around 0
Applied rewrites29.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 0.0)
(sqrt (* (* (* U t) n) 2.0))
(if (<= t_3 4e+302)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(if (<= t_3 INFINITY)
(sqrt (* (* (* (fma (* (/ l Om) -2.0) l t) n) U) 2.0))
(sqrt (* (* -2.0 U) (* l (* 2.0 (/ (* l n) Om))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((((U * t) * n) * 2.0));
} else if (t_3 <= 4e+302) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((((fma(((l / Om) * -2.0), l, t) * n) * U) * 2.0));
} else {
tmp = sqrt(((-2.0 * U) * (l * (2.0 * ((l * n) / Om)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); elseif (t_3 <= 4e+302) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) * n) * U) * 2.0)); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(l * Float64(2.0 * Float64(Float64(l * n) / Om))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 4e+302], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(l * N[(2.0 * N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+302}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\ell \cdot \left(2 \cdot \frac{\ell \cdot n}{Om}\right)\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 12.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Applied rewrites39.4%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 4.0000000000000003e302Initial program 96.3%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6489.4
Applied rewrites89.4%
if 4.0000000000000003e302 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 29.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6426.4
Applied rewrites26.4%
Applied rewrites35.9%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6438.9
Applied rewrites38.9%
Applied rewrites53.6%
Taylor expanded in n around 0
Applied rewrites21.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (- U U*) n))
(t_2 (pow (/ l Om) 2.0))
(t_3 (* (* 2.0 n) U))
(t_4
(sqrt
(* t_3 (- (- t (* 2.0 (/ (* l l) Om))) (* (* n t_2) (- U U*)))))))
(if (<= t_4 0.0)
(sqrt (* (* (- (fma (* (/ l Om) -2.0) l t) (* t_1 t_2)) (* 2.0 n)) U))
(if (<= t_4 INFINITY)
(sqrt
(* t_3 (fma (* -2.0 (/ l Om)) l (- t (* (/ l Om) (* (/ l Om) t_1))))))
(sqrt
(*
(* (* (* -2.0 U) l) (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n))
l))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (U - U_42_) * n;
double t_2 = pow((l / Om), 2.0);
double t_3 = (2.0 * n) * U;
double t_4 = sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) - ((n * t_2) * (U - U_42_)))));
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt((((fma(((l / Om) * -2.0), l, t) - (t_1 * t_2)) * (2.0 * n)) * U));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_3 * fma((-2.0 * (l / Om)), l, (t - ((l / Om) * ((l / Om) * t_1))))));
} else {
tmp = sqrt(((((-2.0 * U) * l) * ((fma((n / Om), (U - U_42_), 2.0) / Om) * n)) * l));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(U - U_42_) * n) t_2 = Float64(l / Om) ^ 2.0 t_3 = Float64(Float64(2.0 * n) * U) t_4 = sqrt(Float64(t_3 * 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_4 <= 0.0) tmp = sqrt(Float64(Float64(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) - Float64(t_1 * t_2)) * Float64(2.0 * n)) * U)); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_3 * fma(Float64(-2.0 * Float64(l / Om)), l, Float64(t - Float64(Float64(l / Om) * Float64(Float64(l / Om) * t_1)))))); else tmp = sqrt(Float64(Float64(Float64(Float64(-2.0 * U) * l) * Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n)) * l)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$3 * 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$4, 0.0], N[Sqrt[N[(N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] - N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * N[(N[(-2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision] * l + N[(t - N[(N[(l / Om), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(-2.0 * U), $MachinePrecision] * l), $MachinePrecision] * N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(U - U*\right) \cdot n\\
t_2 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := \sqrt{t\_3 \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\_4 \leq 0:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) - t\_1 \cdot t\_2\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_3 \cdot \mathsf{fma}\left(-2 \cdot \frac{\ell}{Om}, \ell, t - \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(\left(-2 \cdot U\right) \cdot \ell\right) \cdot \left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right)\right) \cdot \ell}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 13.6%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6413.6
lift-*.f64N/A
Applied rewrites13.6%
Applied rewrites46.2%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.7%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6472.9
lift-*.f64N/A
Applied rewrites68.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6470.1
Applied rewrites70.1%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6438.9
Applied rewrites38.9%
Applied rewrites52.5%
Applied rewrites61.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(* t_2 (- (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U U*)))))))
(if (<= t_3 0.0)
(sqrt (* (* (- (fma n 2.0 t) (* (* n (- U U*)) t_1)) (* n 2.0)) U))
(if (<= t_3 INFINITY)
(sqrt
(*
t_2
(fma
(* -2.0 (/ l Om))
l
(- t (* (/ l Om) (* (/ l Om) (* (- U U*) n)))))))
(sqrt
(*
(* (* (* -2.0 U) l) (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n))
l))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = pow((l / Om), 2.0);
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) - ((n * t_1) * (U - U_42_)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((((fma(n, 2.0, t) - ((n * (U - U_42_)) * t_1)) * (n * 2.0)) * U));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma((-2.0 * (l / Om)), l, (t - ((l / Om) * ((l / Om) * ((U - U_42_) * n)))))));
} else {
tmp = sqrt(((((-2.0 * U) * l) * ((fma((n / Om), (U - U_42_), 2.0) / Om) * n)) * l));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Om) ^ 2.0 t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * t_1) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(Float64(fma(n, 2.0, t) - Float64(Float64(n * Float64(U - U_42_)) * t_1)) * Float64(n * 2.0)) * U)); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(Float64(-2.0 * Float64(l / Om)), l, Float64(t - Float64(Float64(l / Om) * Float64(Float64(l / Om) * Float64(Float64(U - U_42_) * n))))))); else tmp = sqrt(Float64(Float64(Float64(Float64(-2.0 * U) * l) * Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n)) * l)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * t$95$1), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(N[(N[(n * 2.0 + t), $MachinePrecision] - N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(-2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision] * l + N[(t - N[(N[(l / Om), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(-2.0 * U), $MachinePrecision] * l), $MachinePrecision] * N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot t\_1\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(n, 2, t\right) - \left(n \cdot \left(U - U*\right)\right) \cdot t\_1\right) \cdot \left(n \cdot 2\right)\right) \cdot U}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2 \cdot \frac{\ell}{Om}, \ell, t - \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot n\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(\left(-2 \cdot U\right) \cdot \ell\right) \cdot \left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right)\right) \cdot \ell}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 13.6%
Applied rewrites46.2%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.7%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6472.9
lift-*.f64N/A
Applied rewrites68.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6470.1
Applied rewrites70.1%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6438.9
Applied rewrites38.9%
Applied rewrites52.5%
Applied rewrites61.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_3 2e-137)
(sqrt (* (* -2.0 (* (- U) (fma -2.0 t_1 t))) n))
(if (<= t_3 INFINITY)
(sqrt
(*
t_2
(fma
(* -2.0 (/ l Om))
l
(- t (* (/ l Om) (* (/ l Om) (* (- U U*) n)))))))
(sqrt
(*
(* (* (* -2.0 U) l) (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n))
l))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_3 <= 2e-137) {
tmp = sqrt(((-2.0 * (-U * fma(-2.0, t_1, t))) * n));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma((-2.0 * (l / Om)), l, (t - ((l / Om) * ((l / Om) * ((U - U_42_) * n)))))));
} else {
tmp = sqrt(((((-2.0 * U) * l) * ((fma((n / Om), (U - U_42_), 2.0) / Om) * n)) * l));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 2e-137) tmp = sqrt(Float64(Float64(-2.0 * Float64(Float64(-U) * fma(-2.0, t_1, t))) * n)); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(Float64(-2.0 * Float64(l / Om)), l, Float64(t - Float64(Float64(l / Om) * Float64(Float64(l / Om) * Float64(Float64(U - U_42_) * n))))))); else tmp = sqrt(Float64(Float64(Float64(Float64(-2.0 * U) * l) * Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n)) * l)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-137], N[Sqrt[N[(N[(-2.0 * N[((-U) * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(-2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision] * l + N[(t - N[(N[(l / Om), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(-2.0 * U), $MachinePrecision] * l), $MachinePrecision] * N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-137}:\\
\;\;\;\;\sqrt{\left(-2 \cdot \left(\left(-U\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right)\right) \cdot n}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2 \cdot \frac{\ell}{Om}, \ell, t - \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot n\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(\left(-2 \cdot U\right) \cdot \ell\right) \cdot \left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right)\right) \cdot \ell}\\
\end{array}
\end{array}
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-137Initial program 19.1%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites42.8%
Taylor expanded in n around 0
Applied rewrites45.0%
if 1.99999999999999996e-137 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.4%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6472.8
lift-*.f64N/A
Applied rewrites68.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6469.8
Applied rewrites69.8%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6438.9
Applied rewrites38.9%
Applied rewrites52.5%
Applied rewrites61.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_3 0.0)
(sqrt (* (* (* n t) U) 2.0))
(if (<= t_3 1e+154)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt
(*
(* (* (* -2.0 U) l) (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n))
l))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((((n * t) * U) * 2.0));
} else if (t_3 <= 1e+154) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt(((((-2.0 * U) * l) * ((fma((n / Om), (U - U_42_), 2.0) / Om) * n)) * l));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(Float64(n * t) * U) * 2.0)); elseif (t_3 <= 1e+154) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(Float64(Float64(Float64(-2.0 * U) * l) * Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n)) * l)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+154], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(-2.0 * U), $MachinePrecision] * l), $MachinePrecision] * N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq 10^{+154}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(\left(-2 \cdot U\right) \cdot \ell\right) \cdot \left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right)\right) \cdot \ell}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 13.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.9
Applied rewrites41.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 1.00000000000000004e154Initial program 96.3%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6489.5
Applied rewrites89.5%
if 1.00000000000000004e154 < (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*))))) Initial program 18.1%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6429.2
Applied rewrites29.2%
Applied rewrites39.2%
Applied rewrites46.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_3 0.0)
(sqrt (* (* (* n t) U) 2.0))
(if (<= t_3 1e+154)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt
(*
(* -2.0 U)
(* l (/ (* (* (fma (/ n Om) (- U U*) 2.0) n) l) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((((n * t) * U) * 2.0));
} else if (t_3 <= 1e+154) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt(((-2.0 * U) * (l * (((fma((n / Om), (U - U_42_), 2.0) * n) * l) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(Float64(n * t) * U) * 2.0)); elseif (t_3 <= 1e+154) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(l * Float64(Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) * n) * l) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+154], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(l * N[(N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq 10^{+154}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\ell \cdot \frac{\left(\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right) \cdot n\right) \cdot \ell}{Om}\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 13.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.9
Applied rewrites41.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 1.00000000000000004e154Initial program 96.3%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6489.5
Applied rewrites89.5%
if 1.00000000000000004e154 < (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*))))) Initial program 18.1%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6429.2
Applied rewrites29.2%
Applied rewrites39.2%
Applied rewrites43.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_3 0.0)
(sqrt (* (* (* n t) U) 2.0))
(if (<= t_3 1e+154)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt
(*
(* -2.0 U)
(* l (* (* n l) (/ (fma (/ n Om) (- U U*) 2.0) Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((((n * t) * U) * 2.0));
} else if (t_3 <= 1e+154) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt(((-2.0 * U) * (l * ((n * l) * (fma((n / Om), (U - U_42_), 2.0) / Om)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(Float64(n * t) * U) * 2.0)); elseif (t_3 <= 1e+154) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(l * Float64(Float64(n * l) * Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+154], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(l * N[(N[(n * l), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq 10^{+154}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\ell \cdot \left(\left(n \cdot \ell\right) \cdot \frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om}\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 13.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.9
Applied rewrites41.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 1.00000000000000004e154Initial program 96.3%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6489.5
Applied rewrites89.5%
if 1.00000000000000004e154 < (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*))))) Initial program 18.1%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6429.2
Applied rewrites29.2%
Applied rewrites42.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_2 1e-140)
(sqrt (* (* -2.0 (* (- U) (fma -2.0 t_1 t))) n))
(if (<= t_2 INFINITY)
(* (sqrt (* (fma (* (/ l Om) -2.0) l t) (* n U))) (sqrt 2.0))
(sqrt
(*
(* -2.0 U)
(* l (* l (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_2 <= 1e-140) {
tmp = sqrt(((-2.0 * (-U * fma(-2.0, t_1, t))) * n));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((fma(((l / Om) * -2.0), l, t) * (n * U))) * sqrt(2.0);
} else {
tmp = sqrt(((-2.0 * U) * (l * (l * ((fma((n / Om), (U - U_42_), 2.0) / Om) * n)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_2 <= 1e-140) tmp = sqrt(Float64(Float64(-2.0 * Float64(Float64(-U) * fma(-2.0, t_1, t))) * n)); elseif (t_2 <= Inf) tmp = Float64(sqrt(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) * Float64(n * U))) * sqrt(2.0)); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(l * Float64(l * Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 1e-140], N[Sqrt[N[(N[(-2.0 * N[((-U) * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(l * N[(l * N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_2 \leq 10^{-140}:\\
\;\;\;\;\sqrt{\left(-2 \cdot \left(\left(-U\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right)\right) \cdot n}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) \cdot \left(n \cdot U\right)} \cdot \sqrt{2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\ell \cdot \left(\ell \cdot \left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right)\right)\right)}\\
\end{array}
\end{array}
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*))))) < 9.9999999999999998e-141Initial program 15.6%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.4%
Taylor expanded in n around 0
Applied rewrites42.6%
if 9.9999999999999998e-141 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6451.9
Applied rewrites51.9%
Applied rewrites65.7%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6438.9
Applied rewrites38.9%
Applied rewrites52.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_2 1e-140)
(sqrt (* (* -2.0 (* (- U) (fma -2.0 t_1 t))) n))
(if (<= t_2 INFINITY)
(* (sqrt (* (fma (* (/ l Om) -2.0) l t) (* n U))) (sqrt 2.0))
(sqrt (* (* l (* (* U l) (/ (* n (/ (* (- U U*) n) Om)) Om))) -2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_2 <= 1e-140) {
tmp = sqrt(((-2.0 * (-U * fma(-2.0, t_1, t))) * n));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((fma(((l / Om) * -2.0), l, t) * (n * U))) * sqrt(2.0);
} else {
tmp = sqrt(((l * ((U * l) * ((n * (((U - U_42_) * n) / Om)) / Om))) * -2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_2 <= 1e-140) tmp = sqrt(Float64(Float64(-2.0 * Float64(Float64(-U) * fma(-2.0, t_1, t))) * n)); elseif (t_2 <= Inf) tmp = Float64(sqrt(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) * Float64(n * U))) * sqrt(2.0)); else tmp = sqrt(Float64(Float64(l * Float64(Float64(U * l) * Float64(Float64(n * Float64(Float64(Float64(U - U_42_) * n) / Om)) / Om))) * -2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 1e-140], N[Sqrt[N[(N[(-2.0 * N[((-U) * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(l * N[(N[(U * l), $MachinePrecision] * N[(N[(n * N[(N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_2 \leq 10^{-140}:\\
\;\;\;\;\sqrt{\left(-2 \cdot \left(\left(-U\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right)\right) \cdot n}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) \cdot \left(n \cdot U\right)} \cdot \sqrt{2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\ell \cdot \left(\left(U \cdot \ell\right) \cdot \frac{n \cdot \frac{\left(U - U*\right) \cdot n}{Om}}{Om}\right)\right) \cdot -2}\\
\end{array}
\end{array}
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*))))) < 9.9999999999999998e-141Initial program 15.6%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.4%
Taylor expanded in n around 0
Applied rewrites42.6%
if 9.9999999999999998e-141 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6451.9
Applied rewrites51.9%
Applied rewrites65.7%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in n around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6426.8
Applied rewrites26.8%
Applied rewrites35.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_2 1e-140)
(sqrt (* (* -2.0 (* (- U) (fma -2.0 t_1 t))) n))
(if (<= t_2 INFINITY)
(* (sqrt (* (fma (* (/ l Om) -2.0) l t) (* n U))) (sqrt 2.0))
(sqrt (* (* -2.0 U) (* (* (* l l) n) (* (/ U* (- Om)) (/ n Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_2 <= 1e-140) {
tmp = sqrt(((-2.0 * (-U * fma(-2.0, t_1, t))) * n));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((fma(((l / Om) * -2.0), l, t) * (n * U))) * sqrt(2.0);
} else {
tmp = sqrt(((-2.0 * U) * (((l * l) * n) * ((U_42_ / -Om) * (n / Om)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_2 <= 1e-140) tmp = sqrt(Float64(Float64(-2.0 * Float64(Float64(-U) * fma(-2.0, t_1, t))) * n)); elseif (t_2 <= Inf) tmp = Float64(sqrt(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) * Float64(n * U))) * sqrt(2.0)); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(Float64(Float64(l * l) * n) * Float64(Float64(U_42_ / Float64(-Om)) * Float64(n / Om))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 1e-140], N[Sqrt[N[(N[(-2.0 * N[((-U) * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * N[(N[(U$42$ / (-Om)), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_2 \leq 10^{-140}:\\
\;\;\;\;\sqrt{\left(-2 \cdot \left(\left(-U\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right)\right) \cdot n}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) \cdot \left(n \cdot U\right)} \cdot \sqrt{2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \left(\frac{U*}{-Om} \cdot \frac{n}{Om}\right)\right)}\\
\end{array}
\end{array}
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*))))) < 9.9999999999999998e-141Initial program 15.6%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.4%
Taylor expanded in n around 0
Applied rewrites42.6%
if 9.9999999999999998e-141 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6451.9
Applied rewrites51.9%
Applied rewrites65.7%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6438.9
Applied rewrites38.9%
Taylor expanded in U* around inf
Applied rewrites33.1%
Final simplification56.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_3 1e-140)
(sqrt (* (* -2.0 (* (- U) (fma -2.0 t_1 t))) n))
(if (<= t_3 INFINITY)
(* (sqrt (* (fma (* (/ l Om) -2.0) l t) (* n U))) (sqrt 2.0))
(sqrt (* t_2 (* (/ (* U* (* l l)) Om) (/ n Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_3 <= 1e-140) {
tmp = sqrt(((-2.0 * (-U * fma(-2.0, t_1, t))) * n));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((fma(((l / Om) * -2.0), l, t) * (n * U))) * sqrt(2.0);
} else {
tmp = sqrt((t_2 * (((U_42_ * (l * l)) / Om) * (n / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 1e-140) tmp = sqrt(Float64(Float64(-2.0 * Float64(Float64(-U) * fma(-2.0, t_1, t))) * n)); elseif (t_3 <= Inf) tmp = Float64(sqrt(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) * Float64(n * U))) * sqrt(2.0)); else tmp = sqrt(Float64(t_2 * Float64(Float64(Float64(U_42_ * Float64(l * l)) / Om) * Float64(n / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 1e-140], N[Sqrt[N[(N[(-2.0 * N[((-U) * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(t$95$2 * N[(N[(N[(U$42$ * N[(l * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_3 \leq 10^{-140}:\\
\;\;\;\;\sqrt{\left(-2 \cdot \left(\left(-U\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right)\right) \cdot n}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) \cdot \left(n \cdot U\right)} \cdot \sqrt{2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(\frac{U* \cdot \left(\ell \cdot \ell\right)}{Om} \cdot \frac{n}{Om}\right)}\\
\end{array}
\end{array}
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*))))) < 9.9999999999999998e-141Initial program 15.6%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.4%
Taylor expanded in n around 0
Applied rewrites42.6%
if 9.9999999999999998e-141 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6451.9
Applied rewrites51.9%
Applied rewrites65.7%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in U* around inf
associate-*r*N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f6432.5
Applied rewrites32.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_2 1e-280)
(sqrt (* (* -2.0 (* (- U) (fma -2.0 t_1 t))) n))
(if (<= t_2 INFINITY)
(* (sqrt (* (fma (* (/ l Om) -2.0) l t) (* n U))) (sqrt 2.0))
(sqrt
(*
(* -2.0 U)
(* (* (* l l) n) (/ (fma 2.0 Om (* n (- U U*))) (* Om Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_2 <= 1e-280) {
tmp = sqrt(((-2.0 * (-U * fma(-2.0, t_1, t))) * n));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((fma(((l / Om) * -2.0), l, t) * (n * U))) * sqrt(2.0);
} else {
tmp = sqrt(((-2.0 * U) * (((l * l) * n) * (fma(2.0, Om, (n * (U - U_42_))) / (Om * Om)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_2 <= 1e-280) tmp = sqrt(Float64(Float64(-2.0 * Float64(Float64(-U) * fma(-2.0, t_1, t))) * n)); elseif (t_2 <= Inf) tmp = Float64(sqrt(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) * Float64(n * U))) * sqrt(2.0)); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(Float64(Float64(l * l) * n) * Float64(fma(2.0, Om, Float64(n * Float64(U - U_42_))) / Float64(Om * Om))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 1e-280], N[Sqrt[N[(N[(-2.0 * N[((-U) * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * N[(N[(2.0 * Om + N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_2 \leq 10^{-280}:\\
\;\;\;\;\sqrt{\left(-2 \cdot \left(\left(-U\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right)\right) \cdot n}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) \cdot \left(n \cdot U\right)} \cdot \sqrt{2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \frac{\mathsf{fma}\left(2, Om, n \cdot \left(U - U*\right)\right)}{Om \cdot Om}\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 9.9999999999999996e-281Initial program 14.7%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.9%
Taylor expanded in n around 0
Applied rewrites40.1%
if 9.9999999999999996e-281 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 66.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6451.9
Applied rewrites51.9%
Applied rewrites65.7%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6438.9
Applied rewrites38.9%
Taylor expanded in Om around 0
Applied rewrites36.3%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 1e-280)
(sqrt (* (* -2.0 (* (- U) (fma -2.0 t_1 t))) n))
(if (<= t_3 INFINITY)
(* (sqrt (* (fma (* (/ l Om) -2.0) l t) (* n U))) (sqrt 2.0))
(sqrt (* t_2 (/ (* U* (* (* l l) n)) (* Om Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 1e-280) {
tmp = sqrt(((-2.0 * (-U * fma(-2.0, t_1, t))) * n));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((fma(((l / Om) * -2.0), l, t) * (n * U))) * sqrt(2.0);
} else {
tmp = sqrt((t_2 * ((U_42_ * ((l * l) * n)) / (Om * Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 1e-280) tmp = sqrt(Float64(Float64(-2.0 * Float64(Float64(-U) * fma(-2.0, t_1, t))) * n)); elseif (t_3 <= Inf) tmp = Float64(sqrt(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) * Float64(n * U))) * sqrt(2.0)); else tmp = sqrt(Float64(t_2 * Float64(Float64(U_42_ * Float64(Float64(l * l) * n)) / Float64(Om * Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 1e-280], N[Sqrt[N[(N[(-2.0 * N[((-U) * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(t$95$2 * N[(N[(U$42$ * N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 10^{-280}:\\
\;\;\;\;\sqrt{\left(-2 \cdot \left(\left(-U\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right)\right) \cdot n}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) \cdot \left(n \cdot U\right)} \cdot \sqrt{2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_2 \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot Om}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 9.9999999999999996e-281Initial program 14.7%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.9%
Taylor expanded in n around 0
Applied rewrites40.1%
if 9.9999999999999996e-281 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 66.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6451.9
Applied rewrites51.9%
Applied rewrites65.7%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Taylor expanded in Om around -inf
+-commutativeN/A
lower-+.f64N/A
Applied rewrites32.7%
Taylor expanded in U* around inf
Applied rewrites32.1%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.6e-64)
(sqrt (* (* (* U t) n) 2.0))
(if (<= l 3e+161)
(sqrt (* (* (* (fma (* (/ l Om) -2.0) l t) n) U) 2.0))
(sqrt (* (* -2.0 U) (* l (* 2.0 (/ (* l n) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.6e-64) {
tmp = sqrt((((U * t) * n) * 2.0));
} else if (l <= 3e+161) {
tmp = sqrt((((fma(((l / Om) * -2.0), l, t) * n) * U) * 2.0));
} else {
tmp = sqrt(((-2.0 * U) * (l * (2.0 * ((l * n) / Om)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.6e-64) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); elseif (l <= 3e+161) tmp = sqrt(Float64(Float64(Float64(fma(Float64(Float64(l / Om) * -2.0), l, t) * n) * U) * 2.0)); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(l * Float64(2.0 * Float64(Float64(l * n) / Om))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.6e-64], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3e+161], N[Sqrt[N[(N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] * l + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(l * N[(2.0 * N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.6 \cdot 10^{-64}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{elif}\;\ell \leq 3 \cdot 10^{+161}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot -2, \ell, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\ell \cdot \left(2 \cdot \frac{\ell \cdot n}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 1.59999999999999988e-64Initial program 48.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
Applied rewrites44.7%
if 1.59999999999999988e-64 < l < 3.00000000000000011e161Initial program 66.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6457.3
Applied rewrites57.3%
Applied rewrites62.2%
if 3.00000000000000011e161 < l Initial program 11.3%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6428.5
Applied rewrites28.5%
Applied rewrites46.3%
Taylor expanded in n around 0
Applied rewrites40.8%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.15e+64) (sqrt (* (* (* U t) n) 2.0)) (sqrt (* (* -2.0 U) (* l (* 2.0 (/ (* l n) Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.15e+64) {
tmp = sqrt((((U * t) * n) * 2.0));
} else {
tmp = sqrt(((-2.0 * U) * (l * (2.0 * ((l * n) / Om)))));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.15d+64) then
tmp = sqrt((((u * t) * n) * 2.0d0))
else
tmp = sqrt((((-2.0d0) * u) * (l * (2.0d0 * ((l * n) / om)))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.15e+64) {
tmp = Math.sqrt((((U * t) * n) * 2.0));
} else {
tmp = Math.sqrt(((-2.0 * U) * (l * (2.0 * ((l * n) / Om)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.15e+64: tmp = math.sqrt((((U * t) * n) * 2.0)) else: tmp = math.sqrt(((-2.0 * U) * (l * (2.0 * ((l * n) / Om))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.15e+64) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(l * Float64(2.0 * Float64(Float64(l * n) / Om))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.15e+64) tmp = sqrt((((U * t) * n) * 2.0)); else tmp = sqrt(((-2.0 * U) * (l * (2.0 * ((l * n) / Om))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.15e+64], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(l * N[(2.0 * N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.15 \cdot 10^{+64}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\ell \cdot \left(2 \cdot \frac{\ell \cdot n}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 1.15e64Initial program 51.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6440.8
Applied rewrites40.8%
Applied rewrites44.5%
if 1.15e64 < l Initial program 23.5%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6435.5
Applied rewrites35.5%
Applied rewrites48.1%
Taylor expanded in n around 0
Applied rewrites44.4%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 7.2e+58) (sqrt (* (* (* U t) n) 2.0)) (sqrt (* (* -2.0 U) (* 2.0 (/ (* (* l l) n) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 7.2e+58) {
tmp = sqrt((((U * t) * n) * 2.0));
} else {
tmp = sqrt(((-2.0 * U) * (2.0 * (((l * l) * n) / Om))));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 7.2d+58) then
tmp = sqrt((((u * t) * n) * 2.0d0))
else
tmp = sqrt((((-2.0d0) * u) * (2.0d0 * (((l * l) * n) / om))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 7.2e+58) {
tmp = Math.sqrt((((U * t) * n) * 2.0));
} else {
tmp = Math.sqrt(((-2.0 * U) * (2.0 * (((l * l) * n) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 7.2e+58: tmp = math.sqrt((((U * t) * n) * 2.0)) else: tmp = math.sqrt(((-2.0 * U) * (2.0 * (((l * l) * n) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 7.2e+58) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(2.0 * Float64(Float64(Float64(l * l) * n) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 7.2e+58) tmp = sqrt((((U * t) * n) * 2.0)); else tmp = sqrt(((-2.0 * U) * (2.0 * (((l * l) * n) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 7.2e+58], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7.2 \cdot 10^{+58}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(2 \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}\right)}\\
\end{array}
\end{array}
if l < 7.19999999999999993e58Initial program 51.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6440.8
Applied rewrites40.8%
Applied rewrites44.5%
if 7.19999999999999993e58 < l Initial program 23.5%
Taylor expanded in l around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6435.5
Applied rewrites35.5%
Taylor expanded in n around 0
Applied rewrites22.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U 4e-91) (sqrt (* (* (* U t) n) 2.0)) (sqrt (* t (* (+ U U) n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 4e-91) {
tmp = sqrt((((U * t) * n) * 2.0));
} else {
tmp = sqrt((t * ((U + U) * n)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 4d-91) then
tmp = sqrt((((u * t) * n) * 2.0d0))
else
tmp = sqrt((t * ((u + u) * n)))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 4e-91) {
tmp = Math.sqrt((((U * t) * n) * 2.0));
} else {
tmp = Math.sqrt((t * ((U + U) * n)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 4e-91: tmp = math.sqrt((((U * t) * n) * 2.0)) else: tmp = math.sqrt((t * ((U + U) * n))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 4e-91) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); else tmp = sqrt(Float64(t * Float64(Float64(U + U) * n))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 4e-91) tmp = sqrt((((U * t) * n) * 2.0)); else tmp = sqrt((t * ((U + U) * n))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 4e-91], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t * N[(N[(U + U), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 4 \cdot 10^{-91}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot \left(\left(U + U\right) \cdot n\right)}\\
\end{array}
\end{array}
if U < 4.00000000000000009e-91Initial program 42.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6433.2
Applied rewrites33.2%
Applied rewrites38.9%
if 4.00000000000000009e-91 < U Initial program 58.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
Applied rewrites46.9%
Applied rewrites46.9%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* t (* (+ U U) n))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((t * ((U + U) * n)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((t * ((u + u) * n)))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((t * ((U + U) * n)));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((t * ((U + U) * n)))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(t * Float64(Float64(U + U) * n))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((t * ((U + U) * n))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(t * N[(N[(U + U), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{t \cdot \left(\left(U + U\right) \cdot n\right)}
\end{array}
Initial program 46.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6435.1
Applied rewrites35.1%
Applied rewrites35.9%
Applied rewrites35.9%
herbie shell --seed 2024360
(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*))))))