
(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}
Herbie found 19 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 (fma -2.0 (* l (/ l Om)) t))
(t_2 (* (* 2.0 n) U))
(t_3 (* (/ l Om) (/ l Om)))
(t_4 (- t (* 2.0 (/ (* l l) Om))))
(t_5 (* t_2 (- t_4 (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_5 0.0)
(sqrt (* (+ U U) (* n t_1)))
(if (<= t_5 4e+272)
(sqrt (* t_2 (- t_4 (* (* n t_3) (- U U*)))))
(if (<= t_5 INFINITY)
(* (sqrt (* (* U n) 2.0)) (sqrt (- t_1 (* (- U U*) (* t_3 n)))))
(sqrt
(*
(* -2.0 U)
(* (* (* l l) n) (/ (+ 2.0 (/ (* n (- U U*)) Om)) Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(-2.0, (l * (l / Om)), t);
double t_2 = (2.0 * n) * U;
double t_3 = (l / Om) * (l / Om);
double t_4 = t - (2.0 * ((l * l) / Om));
double t_5 = t_2 * (t_4 - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_5 <= 0.0) {
tmp = sqrt(((U + U) * (n * t_1)));
} else if (t_5 <= 4e+272) {
tmp = sqrt((t_2 * (t_4 - ((n * t_3) * (U - U_42_)))));
} else if (t_5 <= ((double) INFINITY)) {
tmp = sqrt(((U * n) * 2.0)) * sqrt((t_1 - ((U - U_42_) * (t_3 * n))));
} else {
tmp = sqrt(((-2.0 * U) * (((l * l) * n) * ((2.0 + ((n * (U - U_42_)) / Om)) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(-2.0, Float64(l * Float64(l / Om)), t) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(Float64(l / Om) * Float64(l / Om)) t_4 = Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) t_5 = Float64(t_2 * Float64(t_4 - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_5 <= 0.0) tmp = sqrt(Float64(Float64(U + U) * Float64(n * t_1))); elseif (t_5 <= 4e+272) tmp = sqrt(Float64(t_2 * Float64(t_4 - Float64(Float64(n * t_3) * Float64(U - U_42_))))); elseif (t_5 <= Inf) tmp = Float64(sqrt(Float64(Float64(U * n) * 2.0)) * sqrt(Float64(t_1 - Float64(Float64(U - U_42_) * Float64(t_3 * n))))); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(Float64(Float64(l * l) * n) * Float64(Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om)) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(N[(l / Om), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * N[(t$95$4 - 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$5, 0.0], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$5, 4e+272], N[Sqrt[N[(t$95$2 * N[(t$95$4 - N[(N[(n * t$95$3), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[Sqrt[N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(t$95$1 - N[(N[(U - U$42$), $MachinePrecision] * N[(t$95$3 * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * N[(N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \frac{\ell}{Om} \cdot \frac{\ell}{Om}\\
t_4 := t - 2 \cdot \frac{\ell \cdot \ell}{Om}\\
t_5 := t\_2 \cdot \left(t\_4 - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_5 \leq 0:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(n \cdot t\_1\right)}\\
\mathbf{elif}\;t\_5 \leq 4 \cdot 10^{+272}:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(t\_4 - \left(n \cdot t\_3\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;\sqrt{\left(U \cdot n\right) \cdot 2} \cdot \sqrt{t\_1 - \left(U - U*\right) \cdot \left(t\_3 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \frac{2 + \frac{n \cdot \left(U - U*\right)}{Om}}{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*)))) < 0.0Initial program 10.3%
Taylor expanded in n around 0
Applied rewrites36.1%
Taylor expanded in t around inf
Applied rewrites30.6%
Applied rewrites30.6%
Taylor expanded in n around 0
Applied rewrites36.1%
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.0000000000000003e272Initial program 97.3%
Applied rewrites97.3%
if 4.0000000000000003e272 < (*.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 34.4%
Applied rewrites31.5%
Applied rewrites31.5%
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
Applied rewrites33.6%
Taylor expanded in Om around inf
Applied rewrites40.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (sqrt (* (+ U U) (* n (fma -2.0 (* l (/ l Om)) t)))))
(t_3 (- t (* 2.0 (/ (* l l) Om))))
(t_4 (* t_1 (- t_3 (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_4 0.0)
t_2
(if (<= t_4 5e+306)
(sqrt (* t_1 (- t_3 (* (* n (* (/ l Om) (/ l Om))) (- U U*)))))
(if (<= t_4 INFINITY)
t_2
(sqrt
(*
(* -2.0 U)
(* (* (* l l) n) (/ (+ 2.0 (/ (* n (- U U*)) Om)) Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = sqrt(((U + U) * (n * fma(-2.0, (l * (l / Om)), t))));
double t_3 = t - (2.0 * ((l * l) / Om));
double t_4 = t_1 * (t_3 - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_4 <= 0.0) {
tmp = t_2;
} else if (t_4 <= 5e+306) {
tmp = sqrt((t_1 * (t_3 - ((n * ((l / Om) * (l / Om))) * (U - U_42_)))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = sqrt(((-2.0 * U) * (((l * l) * n) * ((2.0 + ((n * (U - U_42_)) / Om)) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = sqrt(Float64(Float64(U + U) * Float64(n * fma(-2.0, Float64(l * Float64(l / Om)), t)))) t_3 = Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) t_4 = Float64(t_1 * Float64(t_3 - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_4 <= 0.0) tmp = t_2; elseif (t_4 <= 5e+306) tmp = sqrt(Float64(t_1 * Float64(t_3 - Float64(Float64(n * Float64(Float64(l / Om) * Float64(l / Om))) * Float64(U - U_42_))))); elseif (t_4 <= Inf) tmp = t_2; else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(Float64(Float64(l * l) * n) * Float64(Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om)) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(n * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * N[(t$95$3 - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], t$95$2, If[LessEqual[t$95$4, 5e+306], N[Sqrt[N[(t$95$1 * N[(t$95$3 - N[(N[(n * N[(N[(l / Om), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$2, N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * N[(N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := \sqrt{\left(U + U\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\right)}\\
t_3 := t - 2 \cdot \frac{\ell \cdot \ell}{Om}\\
t_4 := t\_1 \cdot \left(t\_3 - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(t\_3 - \left(n \cdot \left(\frac{\ell}{Om} \cdot \frac{\ell}{Om}\right)\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \frac{2 + \frac{n \cdot \left(U - U*\right)}{Om}}{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*)))) < 0.0 or 4.99999999999999993e306 < (*.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 24.4%
Taylor expanded in n around 0
Applied rewrites35.2%
Taylor expanded in t around inf
Applied rewrites18.5%
Applied rewrites18.5%
Taylor expanded in n around 0
Applied rewrites35.2%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 4.99999999999999993e306Initial program 97.4%
Applied rewrites97.4%
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
Applied rewrites33.6%
Taylor expanded in Om around inf
Applied rewrites40.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma -2.0 (* l (/ l Om)) t))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_2 2e-17)
(sqrt
(*
(fma
(* 2.0 U)
t_1
(* (/ (* (* (* l l) U) (* (- U U*) n)) (* Om Om)) -2.0))
n))
(if (<= t_2 INFINITY)
(sqrt (* (* (+ n n) U) t_1))
(sqrt
(*
(* -2.0 U)
(* (* (* l l) n) (/ (+ 2.0 (/ (* n (- U U*)) Om)) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(-2.0, (l * (l / Om)), t);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_2 <= 2e-17) {
tmp = sqrt((fma((2.0 * U), t_1, (((((l * l) * U) * ((U - U_42_) * n)) / (Om * Om)) * -2.0)) * n));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((((n + n) * U) * t_1));
} else {
tmp = sqrt(((-2.0 * U) * (((l * l) * n) * ((2.0 + ((n * (U - U_42_)) / Om)) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(-2.0, Float64(l * Float64(l / Om)), t) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_2 <= 2e-17) tmp = sqrt(Float64(fma(Float64(2.0 * U), t_1, Float64(Float64(Float64(Float64(Float64(l * l) * U) * Float64(Float64(U - U_42_) * n)) / Float64(Om * Om)) * -2.0)) * n)); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(Float64(n + n) * U) * t_1)); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(Float64(Float64(l * l) * n) * Float64(Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om)) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 2e-17], N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t$95$1 + N[(N[(N[(N[(N[(l * l), $MachinePrecision] * U), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * U), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * N[(N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-17}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2 \cdot U, t\_1, \frac{\left(\left(\ell \cdot \ell\right) \cdot U\right) \cdot \left(\left(U - U*\right) \cdot n\right)}{Om \cdot Om} \cdot -2\right) \cdot n}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \frac{2 + \frac{n \cdot \left(U - U*\right)}{Om}}{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*))))) < 2.00000000000000014e-17Initial program 58.6%
Taylor expanded in n around 0
Applied rewrites56.2%
if 2.00000000000000014e-17 < (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 60.2%
Taylor expanded in n around 0
Applied rewrites55.6%
Applied rewrites55.6%
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
Applied rewrites31.6%
Taylor expanded in Om around inf
Applied rewrites39.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma -2.0 (* l (/ l Om)) t))
(t_2
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_2 2e-323)
(sqrt (* (+ U U) (* n t_1)))
(if (<= t_2 INFINITY)
(sqrt (* (* (+ n n) U) t_1))
(sqrt
(*
(* -2.0 U)
(* (* (* l l) n) (/ (+ 2.0 (/ (* n (- U U*)) Om)) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(-2.0, (l * (l / Om)), t);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_2 <= 2e-323) {
tmp = sqrt(((U + U) * (n * t_1)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((((n + n) * U) * t_1));
} else {
tmp = sqrt(((-2.0 * U) * (((l * l) * n) * ((2.0 + ((n * (U - U_42_)) / Om)) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(-2.0, Float64(l * Float64(l / Om)), t) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_2 <= 2e-323) tmp = sqrt(Float64(Float64(U + U) * Float64(n * t_1))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(Float64(n + n) * U) * t_1)); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(Float64(Float64(l * l) * n) * Float64(Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om)) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e-323], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * U), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-2.0 * U), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * N[(N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-323}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(n \cdot t\_1\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \frac{2 + \frac{n \cdot \left(U - U*\right)}{Om}}{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*)))) < 1.97626e-323Initial program 10.3%
Taylor expanded in n around 0
Applied rewrites36.1%
Taylor expanded in t around inf
Applied rewrites30.6%
Applied rewrites30.6%
Taylor expanded in n around 0
Applied rewrites36.1%
if 1.97626e-323 < (*.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 68.6%
Taylor expanded in n around 0
Applied rewrites63.1%
Applied rewrites63.1%
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
Applied rewrites33.6%
Taylor expanded in Om around inf
Applied rewrites40.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma -2.0 (* l (/ l Om)) t))
(t_2
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_2 2e-323)
(sqrt (* (+ U U) (* n t_1)))
(if (<= t_2 INFINITY)
(sqrt (* (* (+ n n) U) t_1))
(sqrt (* -2.0 (/ (* U (* l (* l (* n (* n (- U U*)))))) (* Om Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(-2.0, (l * (l / Om)), t);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_2 <= 2e-323) {
tmp = sqrt(((U + U) * (n * t_1)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((((n + n) * U) * t_1));
} else {
tmp = sqrt((-2.0 * ((U * (l * (l * (n * (n * (U - U_42_)))))) / (Om * Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(-2.0, Float64(l * Float64(l / Om)), t) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_2 <= 2e-323) tmp = sqrt(Float64(Float64(U + U) * Float64(n * t_1))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(Float64(n + n) * U) * t_1)); else tmp = sqrt(Float64(-2.0 * Float64(Float64(U * Float64(l * Float64(l * Float64(n * 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[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e-323], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * U), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[(l * N[(l * N[(n * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-323}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(n \cdot t\_1\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{U \cdot \left(\ell \cdot \left(\ell \cdot \left(n \cdot \left(n \cdot \left(U - U*\right)\right)\right)\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*)))) < 1.97626e-323Initial program 10.3%
Taylor expanded in n around 0
Applied rewrites36.1%
Taylor expanded in t around inf
Applied rewrites30.6%
Applied rewrites30.6%
Taylor expanded in n around 0
Applied rewrites36.1%
if 1.97626e-323 < (*.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 68.6%
Taylor expanded in n around 0
Applied rewrites63.1%
Applied rewrites63.1%
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 0
Applied rewrites10.2%
Taylor expanded in n around inf
Applied rewrites29.2%
Applied rewrites32.3%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma -2.0 (* l (/ l Om)) t))
(t_2
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_2 2e-323)
(sqrt (* (+ U U) (* n t_1)))
(if (<= t_2 INFINITY)
(sqrt (* (* (+ n n) U) t_1))
(sqrt (* -2.0 (/ (* U (* (* l l) (* (* n n) (- U*)))) (* Om Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(-2.0, (l * (l / Om)), t);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_2 <= 2e-323) {
tmp = sqrt(((U + U) * (n * t_1)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((((n + n) * U) * t_1));
} else {
tmp = sqrt((-2.0 * ((U * ((l * l) * ((n * n) * -U_42_))) / (Om * Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(-2.0, Float64(l * Float64(l / Om)), t) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_2 <= 2e-323) tmp = sqrt(Float64(Float64(U + U) * Float64(n * t_1))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(Float64(n + n) * U) * t_1)); else tmp = sqrt(Float64(-2.0 * Float64(Float64(U * Float64(Float64(l * l) * Float64(Float64(n * n) * Float64(-U_42_)))) / Float64(Om * Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e-323], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * U), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[(N[(l * l), $MachinePrecision] * N[(N[(n * n), $MachinePrecision] * (-U$42$)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-323}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(n \cdot t\_1\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{U \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(\left(n \cdot n\right) \cdot \left(-U*\right)\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*)))) < 1.97626e-323Initial program 10.3%
Taylor expanded in n around 0
Applied rewrites36.1%
Taylor expanded in t around inf
Applied rewrites30.6%
Applied rewrites30.6%
Taylor expanded in n around 0
Applied rewrites36.1%
if 1.97626e-323 < (*.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 68.6%
Taylor expanded in n around 0
Applied rewrites63.1%
Applied rewrites63.1%
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 0
Applied rewrites10.2%
Taylor expanded in n around inf
Applied rewrites29.2%
Taylor expanded in U around 0
Applied rewrites29.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma -2.0 (* l (/ l Om)) t))
(t_2
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_2 2e-323)
(sqrt (* (+ U U) (* n t_1)))
(if (<= t_2 INFINITY)
(sqrt (* (* (+ n n) U) t_1))
(sqrt (* n (/ (* 2.0 (* U (* U* (* (* l l) n)))) (* Om Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(-2.0, (l * (l / Om)), t);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_2 <= 2e-323) {
tmp = sqrt(((U + U) * (n * t_1)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((((n + n) * U) * t_1));
} else {
tmp = sqrt((n * ((2.0 * (U * (U_42_ * ((l * l) * n)))) / (Om * Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(-2.0, Float64(l * Float64(l / Om)), t) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_2 <= 2e-323) tmp = sqrt(Float64(Float64(U + U) * Float64(n * t_1))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(Float64(n + n) * U) * t_1)); else tmp = sqrt(Float64(n * Float64(Float64(2.0 * Float64(U * 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[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e-323], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * U), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(n * N[(N[(2.0 * N[(U * N[(U$42$ * N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-323}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(n \cdot t\_1\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot \frac{2 \cdot \left(U \cdot \left(U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)\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*)))) < 1.97626e-323Initial program 10.3%
Taylor expanded in n around 0
Applied rewrites36.1%
Taylor expanded in t around inf
Applied rewrites30.6%
Applied rewrites30.6%
Taylor expanded in n around 0
Applied rewrites36.1%
if 1.97626e-323 < (*.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 68.6%
Taylor expanded in n around 0
Applied rewrites63.1%
Applied rewrites63.1%
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
Applied rewrites33.6%
Taylor expanded in n around 0
Applied rewrites5.6%
Taylor expanded in U* around inf
Applied rewrites31.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma -2.0 (* l (/ l Om)) t))
(t_2
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))
(t_3 (* (+ n n) U)))
(if (<= t_2 2e-323)
(sqrt (* (+ U U) (* n t_1)))
(if (<= t_2 INFINITY)
(sqrt (* t_3 t_1))
(sqrt (* t_3 (/ (* U* (* (* l l) n)) (* Om Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(-2.0, (l * (l / Om)), t);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double t_3 = (n + n) * U;
double tmp;
if (t_2 <= 2e-323) {
tmp = sqrt(((U + U) * (n * t_1)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((t_3 * t_1));
} else {
tmp = sqrt((t_3 * ((U_42_ * ((l * l) * n)) / (Om * Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(-2.0, Float64(l * Float64(l / Om)), t) t_2 = Float64(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_)))) t_3 = Float64(Float64(n + n) * U) tmp = 0.0 if (t_2 <= 2e-323) tmp = sqrt(Float64(Float64(U + U) * Float64(n * t_1))); elseif (t_2 <= Inf) tmp = sqrt(Float64(t_3 * t_1)); else tmp = sqrt(Float64(t_3 * 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[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(n + n), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[t$95$2, 2e-323], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(t$95$3 * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$3 * 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 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
t_3 := \left(n + n\right) \cdot U\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-323}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(n \cdot t\_1\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_3 \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*)))) < 1.97626e-323Initial program 10.3%
Taylor expanded in n around 0
Applied rewrites36.1%
Taylor expanded in t around inf
Applied rewrites30.6%
Applied rewrites30.6%
Taylor expanded in n around 0
Applied rewrites36.1%
if 1.97626e-323 < (*.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 68.6%
Taylor expanded in n around 0
Applied rewrites63.1%
Applied rewrites63.1%
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 0
Applied rewrites1.9%
Applied rewrites1.9%
Taylor expanded in U* around inf
Applied rewrites29.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma -2.0 (* l (/ l Om)) t))
(t_2
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_2 2e-323)
(sqrt (* (+ U U) (* n t_1)))
(if (<= t_2 INFINITY)
(sqrt (* (* (+ n n) U) t_1))
(* (sqrt (* U* U)) (/ (* (* (sqrt 2.0) n) l) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(-2.0, (l * (l / Om)), t);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_2 <= 2e-323) {
tmp = sqrt(((U + U) * (n * t_1)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((((n + n) * U) * t_1));
} else {
tmp = sqrt((U_42_ * U)) * (((sqrt(2.0) * n) * l) / Om);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(-2.0, Float64(l * Float64(l / Om)), t) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_2 <= 2e-323) tmp = sqrt(Float64(Float64(U + U) * Float64(n * t_1))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(Float64(n + n) * U) * t_1)); else tmp = Float64(sqrt(Float64(U_42_ * U)) * Float64(Float64(Float64(sqrt(2.0) * n) * l) / Om)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e-323], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * U), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U$42$ * U), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-323}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(n \cdot t\_1\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U* \cdot U} \cdot \frac{\left(\sqrt{2} \cdot n\right) \cdot \ell}{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*)))) < 1.97626e-323Initial program 10.3%
Taylor expanded in n around 0
Applied rewrites36.1%
Taylor expanded in t around inf
Applied rewrites30.6%
Applied rewrites30.6%
Taylor expanded in n around 0
Applied rewrites36.1%
if 1.97626e-323 < (*.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 68.6%
Taylor expanded in n around 0
Applied rewrites63.1%
Applied rewrites63.1%
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 U* around inf
Applied rewrites22.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma -2.0 (* l (/ l Om)) t)) (t_2 (pow (/ l Om) 2.0)))
(if (<= n -5.8e-15)
(sqrt
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 (/ (* l l) Om))) (* n (* t_2 (- U U*))))))
(if (<= n 1.8e-269)
(sqrt (* (+ U U) (* n t_1)))
(*
(pow (* n 2.0) 0.5)
(pow (* U (- t_1 (* (- U U*) (* t_2 n)))) 0.5))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(-2.0, (l * (l / Om)), t);
double t_2 = pow((l / Om), 2.0);
double tmp;
if (n <= -5.8e-15) {
tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - (n * (t_2 * (U - U_42_))))));
} else if (n <= 1.8e-269) {
tmp = sqrt(((U + U) * (n * t_1)));
} else {
tmp = pow((n * 2.0), 0.5) * pow((U * (t_1 - ((U - U_42_) * (t_2 * n)))), 0.5);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(-2.0, Float64(l * Float64(l / Om)), t) t_2 = Float64(l / Om) ^ 2.0 tmp = 0.0 if (n <= -5.8e-15) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(n * Float64(t_2 * Float64(U - U_42_)))))); elseif (n <= 1.8e-269) tmp = sqrt(Float64(Float64(U + U) * Float64(n * t_1))); else tmp = Float64((Float64(n * 2.0) ^ 0.5) * (Float64(U * Float64(t_1 - Float64(Float64(U - U_42_) * Float64(t_2 * n)))) ^ 0.5)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[n, -5.8e-15], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(n * N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 1.8e-269], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Power[N[(n * 2.0), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[N[(U * N[(t$95$1 - N[(N[(U - U$42$), $MachinePrecision] * N[(t$95$2 * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\\
t_2 := {\left(\frac{\ell}{Om}\right)}^{2}\\
\mathbf{if}\;n \leq -5.8 \cdot 10^{-15}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - n \cdot \left(t\_2 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{elif}\;n \leq 1.8 \cdot 10^{-269}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(n \cdot t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(n \cdot 2\right)}^{0.5} \cdot {\left(U \cdot \left(t\_1 - \left(U - U*\right) \cdot \left(t\_2 \cdot n\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if n < -5.80000000000000037e-15Initial program 54.2%
Applied rewrites54.5%
if -5.80000000000000037e-15 < n < 1.79999999999999999e-269Initial program 45.4%
Taylor expanded in n around 0
Applied rewrites52.8%
Taylor expanded in t around inf
Applied rewrites39.4%
Applied rewrites39.4%
Taylor expanded in n around 0
Applied rewrites52.8%
if 1.79999999999999999e-269 < n Initial program 51.0%
Applied rewrites63.4%
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(sqrt
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))
0.0)
(sqrt (* (+ U U) (* t n)))
(sqrt (* (* (+ n n) U) t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))))) <= 0.0) {
tmp = sqrt(((U + U) * (t * n)));
} else {
tmp = sqrt((((n + n) * U) * t));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42))))) <= 0.0d0) then
tmp = sqrt(((u + u) * (t * n)))
else
tmp = sqrt((((n + n) * u) * t))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_))))) <= 0.0) {
tmp = Math.sqrt(((U + U) * (t * n)));
} else {
tmp = Math.sqrt((((n + n) * U) * t));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_))))) <= 0.0: tmp = math.sqrt(((U + U) * (t * n))) else: tmp = math.sqrt((((n + n) * U) * t)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) <= 0.0) tmp = sqrt(Float64(Float64(U + U) * Float64(t * n))); else tmp = sqrt(Float64(Float64(Float64(n + n) * U) * t)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))) <= 0.0) tmp = sqrt(((U + U) * (t * n))); else tmp = sqrt((((n + n) * U) * t)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 0.0], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(t * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 0:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(t \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t}\\
\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 11.6%
Taylor expanded in n around 0
Applied rewrites36.8%
Taylor expanded in t around inf
Applied rewrites32.7%
Applied rewrites32.7%
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*))))) Initial program 55.9%
Taylor expanded in n around 0
Applied rewrites52.4%
Applied rewrites52.4%
Taylor expanded in t around inf
Applied rewrites39.7%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.1e+43)
(sqrt (* (* (* 2.0 U) t) n))
(if (<= l 4e+152)
(sqrt (* (+ U U) (* -2.0 (/ (* (* l l) n) Om))))
(sqrt (* (* (+ n n) U) (* -2.0 (* l (/ l Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.1e+43) {
tmp = sqrt((((2.0 * U) * t) * n));
} else if (l <= 4e+152) {
tmp = sqrt(((U + U) * (-2.0 * (((l * l) * n) / Om))));
} else {
tmp = sqrt((((n + n) * U) * (-2.0 * (l * (l / Om)))));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 4.1d+43) then
tmp = sqrt((((2.0d0 * u) * t) * n))
else if (l <= 4d+152) then
tmp = sqrt(((u + u) * ((-2.0d0) * (((l * l) * n) / om))))
else
tmp = sqrt((((n + n) * u) * ((-2.0d0) * (l * (l / om)))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.1e+43) {
tmp = Math.sqrt((((2.0 * U) * t) * n));
} else if (l <= 4e+152) {
tmp = Math.sqrt(((U + U) * (-2.0 * (((l * l) * n) / Om))));
} else {
tmp = Math.sqrt((((n + n) * U) * (-2.0 * (l * (l / Om)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.1e+43: tmp = math.sqrt((((2.0 * U) * t) * n)) elif l <= 4e+152: tmp = math.sqrt(((U + U) * (-2.0 * (((l * l) * n) / Om)))) else: tmp = math.sqrt((((n + n) * U) * (-2.0 * (l * (l / Om))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.1e+43) tmp = sqrt(Float64(Float64(Float64(2.0 * U) * t) * n)); elseif (l <= 4e+152) tmp = sqrt(Float64(Float64(U + U) * Float64(-2.0 * Float64(Float64(Float64(l * l) * n) / Om)))); else tmp = sqrt(Float64(Float64(Float64(n + n) * U) * Float64(-2.0 * Float64(l * Float64(l / Om))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.1e+43) tmp = sqrt((((2.0 * U) * t) * n)); elseif (l <= 4e+152) tmp = sqrt(((U + U) * (-2.0 * (((l * l) * n) / Om)))); else tmp = sqrt((((n + n) * U) * (-2.0 * (l * (l / Om))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.1e+43], N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 4e+152], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(-2.0 * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * U), $MachinePrecision] * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.1 \cdot 10^{+43}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\
\mathbf{elif}\;\ell \leq 4 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(-2 \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot U\right) \cdot \left(-2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 4.1e43Initial program 54.2%
Taylor expanded in n around 0
Applied rewrites50.3%
Taylor expanded in t around inf
Applied rewrites40.9%
Applied rewrites40.2%
if 4.1e43 < l < 4.0000000000000002e152Initial program 49.3%
Taylor expanded in n around 0
Applied rewrites47.2%
Taylor expanded in t around inf
Applied rewrites25.1%
Applied rewrites25.1%
Taylor expanded in t around 0
Applied rewrites29.8%
if 4.0000000000000002e152 < l Initial program 18.8%
Taylor expanded in n around 0
Applied rewrites33.4%
Applied rewrites33.4%
Taylor expanded in t around 0
Applied rewrites30.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 1.8e+199) (sqrt (* (+ U U) (* n (fma -2.0 (* l (/ l Om)) t)))) (* (sqrt (* (* U n) 2.0)) (sqrt t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 1.8e+199) {
tmp = sqrt(((U + U) * (n * fma(-2.0, (l * (l / Om)), t))));
} else {
tmp = sqrt(((U * n) * 2.0)) * sqrt(t);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 1.8e+199) tmp = sqrt(Float64(Float64(U + U) * Float64(n * fma(-2.0, Float64(l * Float64(l / Om)), t)))); else tmp = Float64(sqrt(Float64(Float64(U * n) * 2.0)) * sqrt(t)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 1.8e+199], N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(n * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.8 \cdot 10^{+199}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot n\right) \cdot 2} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < 1.80000000000000001e199Initial program 50.5%
Taylor expanded in n around 0
Applied rewrites48.3%
Taylor expanded in t around inf
Applied rewrites35.3%
Applied rewrites35.3%
Taylor expanded in n around 0
Applied rewrites48.3%
if 1.80000000000000001e199 < t Initial program 45.7%
Applied rewrites61.3%
Taylor expanded in t around inf
Applied rewrites59.9%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.1e+43) (sqrt (* (* (* 2.0 U) t) n)) (sqrt (* (+ U 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 <= 4.1e+43) {
tmp = sqrt((((2.0 * U) * t) * n));
} else {
tmp = sqrt(((U + 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 <= 4.1d+43) then
tmp = sqrt((((2.0d0 * u) * t) * n))
else
tmp = sqrt(((u + 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 <= 4.1e+43) {
tmp = Math.sqrt((((2.0 * U) * t) * n));
} else {
tmp = Math.sqrt(((U + U) * (-2.0 * (((l * l) * n) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.1e+43: tmp = math.sqrt((((2.0 * U) * t) * n)) else: tmp = math.sqrt(((U + U) * (-2.0 * (((l * l) * n) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.1e+43) tmp = sqrt(Float64(Float64(Float64(2.0 * U) * t) * n)); else tmp = sqrt(Float64(Float64(U + 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 <= 4.1e+43) tmp = sqrt((((2.0 * U) * t) * n)); else tmp = sqrt(((U + U) * (-2.0 * (((l * l) * n) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.1e+43], N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U + 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 4.1 \cdot 10^{+43}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U + U\right) \cdot \left(-2 \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}\right)}\\
\end{array}
\end{array}
if l < 4.1e43Initial program 54.2%
Taylor expanded in n around 0
Applied rewrites50.3%
Taylor expanded in t around inf
Applied rewrites40.9%
Applied rewrites40.2%
if 4.1e43 < l Initial program 31.6%
Taylor expanded in n around 0
Applied rewrites39.3%
Taylor expanded in t around inf
Applied rewrites16.1%
Applied rewrites16.1%
Taylor expanded in t around 0
Applied rewrites23.9%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.3e+43) (sqrt (* (* (* 2.0 U) t) n)) (sqrt (* -4.0 (/ (* U (* (* l l) n)) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.3e+43) {
tmp = sqrt((((2.0 * U) * t) * n));
} else {
tmp = sqrt((-4.0 * ((U * ((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 <= 1.3d+43) then
tmp = sqrt((((2.0d0 * u) * t) * n))
else
tmp = sqrt(((-4.0d0) * ((u * ((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 <= 1.3e+43) {
tmp = Math.sqrt((((2.0 * U) * t) * n));
} else {
tmp = Math.sqrt((-4.0 * ((U * ((l * l) * n)) / Om)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.3e+43: tmp = math.sqrt((((2.0 * U) * t) * n)) else: tmp = math.sqrt((-4.0 * ((U * ((l * l) * n)) / Om))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.3e+43) tmp = sqrt(Float64(Float64(Float64(2.0 * U) * t) * n)); else tmp = sqrt(Float64(-4.0 * Float64(Float64(U * 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 <= 1.3e+43) tmp = sqrt((((2.0 * U) * t) * n)); else tmp = sqrt((-4.0 * ((U * ((l * l) * n)) / Om))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.3e+43], N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(N[(U * N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.3 \cdot 10^{+43}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.3000000000000001e43Initial program 54.2%
Taylor expanded in n around 0
Applied rewrites50.3%
Taylor expanded in t around inf
Applied rewrites40.9%
Applied rewrites40.2%
if 1.3000000000000001e43 < l Initial program 31.8%
Taylor expanded in n around 0
Applied rewrites39.4%
Taylor expanded in t around 0
Applied rewrites24.0%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.2e+43) (sqrt (* (* (* 2.0 U) t) n)) (sqrt (* n (* -4.0 (/ (* U (* l l)) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.2e+43) {
tmp = sqrt((((2.0 * U) * t) * n));
} else {
tmp = sqrt((n * (-4.0 * ((U * (l * l)) / 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.2d+43) then
tmp = sqrt((((2.0d0 * u) * t) * n))
else
tmp = sqrt((n * ((-4.0d0) * ((u * (l * l)) / 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.2e+43) {
tmp = Math.sqrt((((2.0 * U) * t) * n));
} else {
tmp = Math.sqrt((n * (-4.0 * ((U * (l * l)) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.2e+43: tmp = math.sqrt((((2.0 * U) * t) * n)) else: tmp = math.sqrt((n * (-4.0 * ((U * (l * l)) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.2e+43) tmp = sqrt(Float64(Float64(Float64(2.0 * U) * t) * n)); else tmp = sqrt(Float64(n * Float64(-4.0 * Float64(Float64(U * Float64(l * l)) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.2e+43) tmp = sqrt((((2.0 * U) * t) * n)); else tmp = sqrt((n * (-4.0 * ((U * (l * l)) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.2e+43], N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(n * N[(-4.0 * N[(N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.2 \cdot 10^{+43}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot \left(-4 \cdot \frac{U \cdot \left(\ell \cdot \ell\right)}{Om}\right)}\\
\end{array}
\end{array}
if l < 1.20000000000000012e43Initial program 54.2%
Taylor expanded in n around 0
Applied rewrites50.3%
Taylor expanded in t around inf
Applied rewrites40.9%
Applied rewrites40.2%
if 1.20000000000000012e43 < l Initial program 31.8%
Taylor expanded in l around inf
Applied rewrites35.8%
Taylor expanded in n around 0
Applied rewrites23.7%
Taylor expanded in n around 0
Applied rewrites23.0%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 3.6e-295) (sqrt (* (* (* 2.0 U) t) n)) (* (sqrt (* (* U n) 2.0)) (sqrt t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 3.6e-295) {
tmp = sqrt((((2.0 * U) * t) * n));
} else {
tmp = sqrt(((U * n) * 2.0)) * sqrt(t);
}
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 (t <= 3.6d-295) then
tmp = sqrt((((2.0d0 * u) * t) * n))
else
tmp = sqrt(((u * n) * 2.0d0)) * sqrt(t)
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 (t <= 3.6e-295) {
tmp = Math.sqrt((((2.0 * U) * t) * n));
} else {
tmp = Math.sqrt(((U * n) * 2.0)) * Math.sqrt(t);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= 3.6e-295: tmp = math.sqrt((((2.0 * U) * t) * n)) else: tmp = math.sqrt(((U * n) * 2.0)) * math.sqrt(t) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 3.6e-295) tmp = sqrt(Float64(Float64(Float64(2.0 * U) * t) * n)); else tmp = Float64(sqrt(Float64(Float64(U * n) * 2.0)) * sqrt(t)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= 3.6e-295) tmp = sqrt((((2.0 * U) * t) * n)); else tmp = sqrt(((U * n) * 2.0)) * sqrt(t); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 3.6e-295], N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.6 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot n\right) \cdot 2} \cdot \sqrt{t}\\
\end{array}
\end{array}
if t < 3.6000000000000001e-295Initial program 49.8%
Taylor expanded in n around 0
Applied rewrites47.9%
Taylor expanded in t around inf
Applied rewrites35.9%
Applied rewrites34.6%
if 3.6000000000000001e-295 < t Initial program 50.3%
Applied rewrites52.4%
Taylor expanded in t around inf
Applied rewrites43.4%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U -1e+99) (sqrt (* (* (+ n n) U) t)) (sqrt (* (* (* 2.0 U) t) n))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -1e+99) {
tmp = sqrt((((n + n) * U) * t));
} else {
tmp = sqrt((((2.0 * U) * t) * 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 <= (-1d+99)) then
tmp = sqrt((((n + n) * u) * t))
else
tmp = sqrt((((2.0d0 * u) * t) * 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 <= -1e+99) {
tmp = Math.sqrt((((n + n) * U) * t));
} else {
tmp = Math.sqrt((((2.0 * U) * t) * n));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -1e+99: tmp = math.sqrt((((n + n) * U) * t)) else: tmp = math.sqrt((((2.0 * U) * t) * n)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -1e+99) tmp = sqrt(Float64(Float64(Float64(n + n) * U) * t)); else tmp = sqrt(Float64(Float64(Float64(2.0 * U) * t) * n)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -1e+99) tmp = sqrt((((n + n) * U) * t)); else tmp = sqrt((((2.0 * U) * t) * n)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -1e+99], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq -1 \cdot 10^{+99}:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\
\end{array}
\end{array}
if U < -9.9999999999999997e98Initial program 57.1%
Taylor expanded in n around 0
Applied rewrites55.9%
Applied rewrites55.9%
Taylor expanded in t around inf
Applied rewrites45.6%
if -9.9999999999999997e98 < U Initial program 49.2%
Taylor expanded in n around 0
Applied rewrites47.6%
Taylor expanded in t around inf
Applied rewrites35.5%
Applied rewrites35.4%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (+ U U) (* t n))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((U + U) * (t * n)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt(((u + u) * (t * n)))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt(((U + U) * (t * n)));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt(((U + U) * (t * n)))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(U + U) * Float64(t * n))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((U + U) * (t * n))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(U + U), $MachinePrecision] * N[(t * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(U + U\right) \cdot \left(t \cdot n\right)}
\end{array}
Initial program 50.1%
Taylor expanded in n around 0
Applied rewrites48.2%
Taylor expanded in t around inf
Applied rewrites36.3%
Applied rewrites36.3%
herbie shell --seed 2025106
(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*))))))