
(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 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}
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (fma (* -2.0 (/ l_m Om)) l_m t))
(t_2 (* (* 2.0 n) U))
(t_3
(*
t_2
(-
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U U*))))))
(if (<= t_3 -5e-184)
(sqrt (* t_2 (- t_1 (* (* (- U U*) (/ l_m Om)) (* n (/ l_m Om))))))
(if (<= t_3 5e-295)
(sqrt (fma (/ (* (* (* l_m l_m) n) U) Om) -4.0 (* (* (* n t) U) 2.0)))
(if (<= t_3 4e+289)
(sqrt (* t_2 (- t_1 (* (* (/ l_m Om) (* (/ l_m Om) n)) (- U U*)))))
(*
(sqrt (* (* U n) (- (/ (* n (- U U*)) (* (- Om) Om)) (/ 2.0 Om))))
(* l_m (sqrt 2.0))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = fma((-2.0 * (l_m / Om)), l_m, t);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= -5e-184) {
tmp = sqrt((t_2 * (t_1 - (((U - U_42_) * (l_m / Om)) * (n * (l_m / Om))))));
} else if (t_3 <= 5e-295) {
tmp = sqrt(fma(((((l_m * l_m) * n) * U) / Om), -4.0, (((n * t) * U) * 2.0)));
} else if (t_3 <= 4e+289) {
tmp = sqrt((t_2 * (t_1 - (((l_m / Om) * ((l_m / Om) * n)) * (U - U_42_)))));
} else {
tmp = sqrt(((U * n) * (((n * (U - U_42_)) / (-Om * Om)) - (2.0 / Om)))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = fma(Float64(-2.0 * Float64(l_m / Om)), l_m, t) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= -5e-184) tmp = sqrt(Float64(t_2 * Float64(t_1 - Float64(Float64(Float64(U - U_42_) * Float64(l_m / Om)) * Float64(n * Float64(l_m / Om)))))); elseif (t_3 <= 5e-295) tmp = sqrt(fma(Float64(Float64(Float64(Float64(l_m * l_m) * n) * U) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); elseif (t_3 <= 4e+289) tmp = sqrt(Float64(t_2 * Float64(t_1 - Float64(Float64(Float64(l_m / Om) * Float64(Float64(l_m / Om) * n)) * Float64(U - U_42_))))); else tmp = Float64(sqrt(Float64(Float64(U * n) * Float64(Float64(Float64(n * Float64(U - U_42_)) / Float64(Float64(-Om) * Om)) - Float64(2.0 / Om)))) * Float64(l_m * sqrt(2.0))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(-2.0 * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * l$95$m + t), $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 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e-184], N[Sqrt[N[(t$95$2 * N[(t$95$1 - N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * N[(n * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 5e-295], N[Sqrt[N[(N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 4e+289], N[Sqrt[N[(t$95$2 * N[(t$95$1 - N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[((-Om) * Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2 \cdot \frac{l\_m}{Om}, l\_m, t\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{-184}:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(t\_1 - \left(\left(U - U*\right) \cdot \frac{l\_m}{Om}\right) \cdot \left(n \cdot \frac{l\_m}{Om}\right)\right)}\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(\left(l\_m \cdot l\_m\right) \cdot n\right) \cdot U}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(t\_1 - \left(\frac{l\_m}{Om} \cdot \left(\frac{l\_m}{Om} \cdot n\right)\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U - U*\right)}{\left(-Om\right) \cdot Om} - \frac{2}{Om}\right)} \cdot \left(l\_m \cdot \sqrt{2}\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*)))) < -5.00000000000000003e-184Initial program 0.0%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval25.0
Applied rewrites25.0%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6486.9
Applied rewrites86.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
lift-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-pow.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6499.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
if -5.00000000000000003e-184 < (*.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*)))) < 5.00000000000000008e-295Initial program 17.4%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6454.8
Applied rewrites54.8%
if 5.00000000000000008e-295 < (*.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.0000000000000002e289Initial program 97.1%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval97.1
Applied rewrites97.1%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6499.1
Applied rewrites99.1%
if 4.0000000000000002e289 < (*.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 23.0%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval28.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6428.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites30.4%
Taylor expanded in l around inf
lower-*.f64N/A
Applied rewrites26.0%
Final simplification59.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2
(*
t_1
(-
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))
(t_3
(sqrt
(*
t_1
(-
(fma (* -2.0 (/ l_m Om)) l_m t)
(* (* (- U U*) (/ l_m Om)) (* n (/ l_m Om))))))))
(if (<= t_2 -5e-184)
t_3
(if (<= t_2 5e-295)
(sqrt (fma (/ (* (* (* l_m l_m) n) U) Om) -4.0 (* (* (* n t) U) 2.0)))
(if (<= t_2 4e+289)
t_3
(*
(sqrt (* (* U n) (- (/ (* n (- U U*)) (* (- Om) Om)) (/ 2.0 Om))))
(* l_m (sqrt 2.0))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = t_1 * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)));
double t_3 = sqrt((t_1 * (fma((-2.0 * (l_m / Om)), l_m, t) - (((U - U_42_) * (l_m / Om)) * (n * (l_m / Om))))));
double tmp;
if (t_2 <= -5e-184) {
tmp = t_3;
} else if (t_2 <= 5e-295) {
tmp = sqrt(fma(((((l_m * l_m) * n) * U) / Om), -4.0, (((n * t) * U) * 2.0)));
} else if (t_2 <= 4e+289) {
tmp = t_3;
} else {
tmp = sqrt(((U * n) * (((n * (U - U_42_)) / (-Om * Om)) - (2.0 / Om)))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))) t_3 = sqrt(Float64(t_1 * Float64(fma(Float64(-2.0 * Float64(l_m / Om)), l_m, t) - Float64(Float64(Float64(U - U_42_) * Float64(l_m / Om)) * Float64(n * Float64(l_m / Om)))))) tmp = 0.0 if (t_2 <= -5e-184) tmp = t_3; elseif (t_2 <= 5e-295) tmp = sqrt(fma(Float64(Float64(Float64(Float64(l_m * l_m) * n) * U) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); elseif (t_2 <= 4e+289) tmp = t_3; else tmp = Float64(sqrt(Float64(Float64(U * n) * Float64(Float64(Float64(n * Float64(U - U_42_)) / Float64(Float64(-Om) * Om)) - Float64(2.0 / Om)))) * Float64(l_m * sqrt(2.0))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$1 * N[(N[(N[(-2.0 * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * l$95$m + t), $MachinePrecision] - N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * N[(n * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, -5e-184], t$95$3, If[LessEqual[t$95$2, 5e-295], N[Sqrt[N[(N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 4e+289], t$95$3, N[(N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[((-Om) * Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := t\_1 \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
t_3 := \sqrt{t\_1 \cdot \left(\mathsf{fma}\left(-2 \cdot \frac{l\_m}{Om}, l\_m, t\right) - \left(\left(U - U*\right) \cdot \frac{l\_m}{Om}\right) \cdot \left(n \cdot \frac{l\_m}{Om}\right)\right)}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-184}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(\left(l\_m \cdot l\_m\right) \cdot n\right) \cdot U}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U - U*\right)}{\left(-Om\right) \cdot Om} - \frac{2}{Om}\right)} \cdot \left(l\_m \cdot \sqrt{2}\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*)))) < -5.00000000000000003e-184 or 5.00000000000000008e-295 < (*.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.0000000000000002e289Initial program 89.5%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval91.5
Applied rewrites91.5%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6498.1
Applied rewrites98.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
lift-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-pow.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6498.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6498.7
Applied rewrites98.7%
if -5.00000000000000003e-184 < (*.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*)))) < 5.00000000000000008e-295Initial program 17.4%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6454.8
Applied rewrites54.8%
if 4.0000000000000002e289 < (*.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 23.0%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval28.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6428.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites30.4%
Taylor expanded in l around inf
lower-*.f64N/A
Applied rewrites26.0%
Final simplification59.6%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (/ (* l_m l_m) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U U*))))))
(if (<= t_3 5e-295)
(sqrt
(*
(*
-2.0
(-
(* (/ (* (- U) U*) Om) (/ (* (* l_m l_m) n) Om))
(* (fma -2.0 t_1 t) U)))
n))
(if (<= t_3 4e+289)
(sqrt
(*
t_2
(-
(fma (* -2.0 (/ l_m Om)) l_m t)
(* (* (/ l_m Om) (* (/ l_m Om) n)) (- U U*)))))
(*
(sqrt (* (* U n) (- (/ (* n (- U U*)) (* (- Om) Om)) (/ 2.0 Om))))
(* l_m (sqrt 2.0)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (l_m * l_m) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 5e-295) {
tmp = sqrt(((-2.0 * ((((-U * U_42_) / Om) * (((l_m * l_m) * n) / Om)) - (fma(-2.0, t_1, t) * U))) * n));
} else if (t_3 <= 4e+289) {
tmp = sqrt((t_2 * (fma((-2.0 * (l_m / Om)), l_m, t) - (((l_m / Om) * ((l_m / Om) * n)) * (U - U_42_)))));
} else {
tmp = sqrt(((U * n) * (((n * (U - U_42_)) / (-Om * Om)) - (2.0 / Om)))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(l_m * l_m) / 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_m / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 5e-295) tmp = sqrt(Float64(Float64(-2.0 * Float64(Float64(Float64(Float64(Float64(-U) * U_42_) / Om) * Float64(Float64(Float64(l_m * l_m) * n) / Om)) - Float64(fma(-2.0, t_1, t) * U))) * n)); elseif (t_3 <= 4e+289) tmp = sqrt(Float64(t_2 * Float64(fma(Float64(-2.0 * Float64(l_m / Om)), l_m, t) - Float64(Float64(Float64(l_m / Om) * Float64(Float64(l_m / Om) * n)) * Float64(U - U_42_))))); else tmp = Float64(sqrt(Float64(Float64(U * n) * Float64(Float64(Float64(n * Float64(U - U_42_)) / Float64(Float64(-Om) * Om)) - Float64(2.0 / Om)))) * Float64(l_m * sqrt(2.0))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l$95$m * l$95$m), $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$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 5e-295], N[Sqrt[N[(N[(-2.0 * N[(N[(N[(N[((-U) * U$42$), $MachinePrecision] / Om), $MachinePrecision] * N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 4e+289], N[Sqrt[N[(t$95$2 * N[(N[(N[(-2.0 * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * l$95$m + t), $MachinePrecision] - N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[((-Om) * Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{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{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 5 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{\left(-2 \cdot \left(\frac{\left(-U\right) \cdot U*}{Om} \cdot \frac{\left(l\_m \cdot l\_m\right) \cdot n}{Om} - \mathsf{fma}\left(-2, t\_1, t\right) \cdot U\right)\right) \cdot n}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(\mathsf{fma}\left(-2 \cdot \frac{l\_m}{Om}, l\_m, t\right) - \left(\frac{l\_m}{Om} \cdot \left(\frac{l\_m}{Om} \cdot n\right)\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U - U*\right)}{\left(-Om\right) \cdot Om} - \frac{2}{Om}\right)} \cdot \left(l\_m \cdot \sqrt{2}\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*)))) < 5.00000000000000008e-295Initial program 14.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites54.1%
Taylor expanded in U around 0
Applied rewrites56.2%
if 5.00000000000000008e-295 < (*.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.0000000000000002e289Initial program 97.1%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval97.1
Applied rewrites97.1%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6499.1
Applied rewrites99.1%
if 4.0000000000000002e289 < (*.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 23.0%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval28.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6428.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites30.4%
Taylor expanded in l around inf
lower-*.f64N/A
Applied rewrites26.0%
Final simplification58.6%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n l_m) l_m))
(t_2 (* (* 2.0 n) U))
(t_3
(*
t_2
(-
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U U*))))))
(if (<= t_3 5e-295)
(sqrt (fma (/ (* t_1 U) Om) -4.0 (* (* (* n t) U) 2.0)))
(if (<= t_3 4e+289)
(sqrt
(*
t_2
(- (fma (* -2.0 (/ l_m Om)) l_m t) (* (/ t_1 (* Om Om)) (- U U*)))))
(*
(sqrt (* (* U n) (- (/ (* n (- U U*)) (* (- Om) Om)) (/ 2.0 Om))))
(* l_m (sqrt 2.0)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * l_m) * l_m;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 5e-295) {
tmp = sqrt(fma(((t_1 * U) / Om), -4.0, (((n * t) * U) * 2.0)));
} else if (t_3 <= 4e+289) {
tmp = sqrt((t_2 * (fma((-2.0 * (l_m / Om)), l_m, t) - ((t_1 / (Om * Om)) * (U - U_42_)))));
} else {
tmp = sqrt(((U * n) * (((n * (U - U_42_)) / (-Om * Om)) - (2.0 / Om)))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * l_m) * l_m) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 5e-295) tmp = sqrt(fma(Float64(Float64(t_1 * U) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); elseif (t_3 <= 4e+289) tmp = sqrt(Float64(t_2 * Float64(fma(Float64(-2.0 * Float64(l_m / Om)), l_m, t) - Float64(Float64(t_1 / Float64(Om * Om)) * Float64(U - U_42_))))); else tmp = Float64(sqrt(Float64(Float64(U * n) * Float64(Float64(Float64(n * Float64(U - U_42_)) / Float64(Float64(-Om) * Om)) - Float64(2.0 / Om)))) * Float64(l_m * sqrt(2.0))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * l$95$m), $MachinePrecision] * l$95$m), $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 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 5e-295], N[Sqrt[N[(N[(N[(t$95$1 * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 4e+289], N[Sqrt[N[(t$95$2 * N[(N[(N[(-2.0 * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * l$95$m + t), $MachinePrecision] - N[(N[(t$95$1 / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[((-Om) * Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot l\_m\right) \cdot l\_m\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 5 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{t\_1 \cdot U}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(\mathsf{fma}\left(-2 \cdot \frac{l\_m}{Om}, l\_m, t\right) - \frac{t\_1}{Om \cdot Om} \cdot \left(U - U*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U - U*\right)}{\left(-Om\right) \cdot Om} - \frac{2}{Om}\right)} \cdot \left(l\_m \cdot \sqrt{2}\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*)))) < 5.00000000000000008e-295Initial program 14.4%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6450.6
Applied rewrites50.6%
Applied rewrites52.7%
if 5.00000000000000008e-295 < (*.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.0000000000000002e289Initial program 97.1%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval97.1
Applied rewrites97.1%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6499.1
Applied rewrites99.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-/.f64N/A
frac-2negN/A
frac-timesN/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower-neg.f6490.9
Applied rewrites90.9%
if 4.0000000000000002e289 < (*.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 23.0%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval28.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6428.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites30.4%
Taylor expanded in l around inf
lower-*.f64N/A
Applied rewrites26.0%
Final simplification55.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (/ (* l_m l_m) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U U*))))))
(if (<= t_3 5e-295)
(sqrt (fma (/ (* (* (* n l_m) l_m) U) Om) -4.0 (* (* (* n t) U) 2.0)))
(if (<= t_3 4e+289)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(*
(sqrt (* (* U n) (- (/ (* n (- U U*)) (* (- Om) Om)) (/ 2.0 Om))))
(* l_m (sqrt 2.0)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (l_m * l_m) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 5e-295) {
tmp = sqrt(fma(((((n * l_m) * l_m) * U) / Om), -4.0, (((n * t) * U) * 2.0)));
} else if (t_3 <= 4e+289) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt(((U * n) * (((n * (U - U_42_)) / (-Om * Om)) - (2.0 / Om)))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(l_m * l_m) / 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_m / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 5e-295) tmp = sqrt(fma(Float64(Float64(Float64(Float64(n * l_m) * l_m) * U) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); elseif (t_3 <= 4e+289) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = Float64(sqrt(Float64(Float64(U * n) * Float64(Float64(Float64(n * Float64(U - U_42_)) / Float64(Float64(-Om) * Om)) - Float64(2.0 / Om)))) * Float64(l_m * sqrt(2.0))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l$95$m * l$95$m), $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$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 5e-295], N[Sqrt[N[(N[(N[(N[(N[(n * l$95$m), $MachinePrecision] * l$95$m), $MachinePrecision] * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 4e+289], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[((-Om) * Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{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{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 5 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(\left(n \cdot l\_m\right) \cdot l\_m\right) \cdot U}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U - U*\right)}{\left(-Om\right) \cdot Om} - \frac{2}{Om}\right)} \cdot \left(l\_m \cdot \sqrt{2}\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*)))) < 5.00000000000000008e-295Initial program 14.4%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6450.6
Applied rewrites50.6%
Applied rewrites52.7%
if 5.00000000000000008e-295 < (*.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.0000000000000002e289Initial program 97.1%
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-*.f6487.8
Applied rewrites87.8%
if 4.0000000000000002e289 < (*.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 23.0%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval28.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6428.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites30.4%
Taylor expanded in l around inf
lower-*.f64N/A
Applied rewrites26.0%
Final simplification53.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (/ (* l_m l_m) Om))
(t_2 (fma -2.0 t_1 t))
(t_3 (* (* 2.0 n) U))
(t_4
(sqrt
(*
t_3
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))))
(if (<= t_4 1e-147)
(sqrt (* (* (* t_2 n) U) 2.0))
(if (<= t_4 5e+144)
(sqrt (* t_3 t_2))
(sqrt
(fma (* l_m (* (* n l_m) (/ U Om))) -4.0 (* (* (* n t) U) 2.0)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (l_m * l_m) / Om;
double t_2 = fma(-2.0, t_1, t);
double t_3 = (2.0 * n) * U;
double t_4 = sqrt((t_3 * ((t - (2.0 * t_1)) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_4 <= 1e-147) {
tmp = sqrt((((t_2 * n) * U) * 2.0));
} else if (t_4 <= 5e+144) {
tmp = sqrt((t_3 * t_2));
} else {
tmp = sqrt(fma((l_m * ((n * l_m) * (U / Om))), -4.0, (((n * t) * U) * 2.0)));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(l_m * l_m) / Om) t_2 = fma(-2.0, t_1, t) t_3 = Float64(Float64(2.0 * n) * U) t_4 = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_4 <= 1e-147) tmp = sqrt(Float64(Float64(Float64(t_2 * n) * U) * 2.0)); elseif (t_4 <= 5e+144) tmp = sqrt(Float64(t_3 * t_2)); else tmp = sqrt(fma(Float64(l_m * Float64(Float64(n * l_m) * Float64(U / Om))), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * t$95$1 + t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 1e-147], N[Sqrt[N[(N[(N[(t$95$2 * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 5e+144], N[Sqrt[N[(t$95$3 * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(l$95$m * N[(N[(n * l$95$m), $MachinePrecision] * N[(U / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \mathsf{fma}\left(-2, t\_1, t\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := \sqrt{t\_3 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_4 \leq 10^{-147}:\\
\;\;\;\;\sqrt{\left(\left(t\_2 \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+144}:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(l\_m \cdot \left(\left(n \cdot l\_m\right) \cdot \frac{U}{Om}\right), -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\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.9999999999999997e-148Initial program 17.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.8
Applied rewrites54.8%
if 9.9999999999999997e-148 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4.9999999999999999e144Initial program 97.1%
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-*.f6487.8
Applied rewrites87.8%
if 4.9999999999999999e144 < (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 21.4%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6420.8
Applied rewrites20.8%
Applied rewrites32.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (/ (* l_m l_m) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U U*))))))
(if (<= t_3 5e-295)
(sqrt (fma (/ (* (* (* n l_m) l_m) U) Om) -4.0 (* (* (* n t) U) 2.0)))
(if (<= t_3 4e+289)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt
(*
(* -2.0 U)
(* l_m (* (* n l_m) (/ (fma (/ (- U U*) Om) n 2.0) Om)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (l_m * l_m) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 5e-295) {
tmp = sqrt(fma(((((n * l_m) * l_m) * U) / Om), -4.0, (((n * t) * U) * 2.0)));
} else if (t_3 <= 4e+289) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt(((-2.0 * U) * (l_m * ((n * l_m) * (fma(((U - U_42_) / Om), n, 2.0) / Om)))));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(l_m * l_m) / 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_m / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 5e-295) tmp = sqrt(fma(Float64(Float64(Float64(Float64(n * l_m) * l_m) * U) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); elseif (t_3 <= 4e+289) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(Float64(-2.0 * U) * Float64(l_m * Float64(Float64(n * l_m) * Float64(fma(Float64(Float64(U - U_42_) / Om), n, 2.0) / Om))))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l$95$m * l$95$m), $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$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 5e-295], N[Sqrt[N[(N[(N[(N[(N[(n * l$95$m), $MachinePrecision] * l$95$m), $MachinePrecision] * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 4e+289], 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$95$m * N[(N[(n * l$95$m), $MachinePrecision] * N[(N[(N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] * n + 2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{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{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 5 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(\left(n \cdot l\_m\right) \cdot l\_m\right) \cdot U}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot U\right) \cdot \left(l\_m \cdot \left(\left(n \cdot l\_m\right) \cdot \frac{\mathsf{fma}\left(\frac{U - U*}{Om}, n, 2\right)}{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*)))) < 5.00000000000000008e-295Initial program 14.4%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6450.6
Applied rewrites50.6%
Applied rewrites52.7%
if 5.00000000000000008e-295 < (*.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.0000000000000002e289Initial program 97.1%
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-*.f6487.8
Applied rewrites87.8%
if 4.0000000000000002e289 < (*.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 23.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
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-/.f6431.7
Applied rewrites31.7%
Applied rewrites47.6%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (/ (* l_m l_m) Om))
(t_2 (fma -2.0 t_1 t))
(t_3 (* (* 2.0 n) U))
(t_4
(*
t_3
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U U*))))))
(if (<= t_4 5e-295)
(sqrt (* (* (* t_2 n) U) 2.0))
(if (<= t_4 4e+289)
(sqrt (* t_3 t_2))
(sqrt (* (* (/ (* U* (* (* l_m l_m) n)) (* Om Om)) (* 2.0 n)) U))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (l_m * l_m) / Om;
double t_2 = fma(-2.0, t_1, t);
double t_3 = (2.0 * n) * U;
double t_4 = t_3 * ((t - (2.0 * t_1)) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_4 <= 5e-295) {
tmp = sqrt((((t_2 * n) * U) * 2.0));
} else if (t_4 <= 4e+289) {
tmp = sqrt((t_3 * t_2));
} else {
tmp = sqrt(((((U_42_ * ((l_m * l_m) * n)) / (Om * Om)) * (2.0 * n)) * U));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(l_m * l_m) / Om) t_2 = fma(-2.0, t_1, t) t_3 = Float64(Float64(2.0 * n) * U) t_4 = Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_4 <= 5e-295) tmp = sqrt(Float64(Float64(Float64(t_2 * n) * U) * 2.0)); elseif (t_4 <= 4e+289) tmp = sqrt(Float64(t_3 * t_2)); else tmp = sqrt(Float64(Float64(Float64(Float64(U_42_ * Float64(Float64(l_m * l_m) * n)) / Float64(Om * Om)) * Float64(2.0 * n)) * U)); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * t$95$1 + t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 5e-295], N[Sqrt[N[(N[(N[(t$95$2 * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 4e+289], N[Sqrt[N[(t$95$3 * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(U$42$ * N[(N[(l$95$m * l$95$m), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \mathsf{fma}\left(-2, t\_1, t\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := t\_3 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_4 \leq 5 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{\left(\left(t\_2 \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\frac{U* \cdot \left(\left(l\_m \cdot l\_m\right) \cdot n\right)}{Om \cdot Om} \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\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*)))) < 5.00000000000000008e-295Initial program 14.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.6
Applied rewrites50.6%
if 5.00000000000000008e-295 < (*.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.0000000000000002e289Initial program 97.1%
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-*.f6487.8
Applied rewrites87.8%
if 4.0000000000000002e289 < (*.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 23.0%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/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-eval28.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6428.9
Applied rewrites28.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites30.4%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6426.8
Applied rewrites26.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (/ (* l_m l_m) Om))
(t_2 (fma -2.0 t_1 t))
(t_3 (* (* 2.0 n) U))
(t_4
(*
t_3
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U U*))))))
(if (<= t_4 5e-295)
(sqrt (* (* (* t_2 n) U) 2.0))
(if (<= t_4 4e+289)
(sqrt (* t_3 t_2))
(sqrt (* 2.0 (/ (* (* U U*) (* (* l_m l_m) (* n n))) (* Om Om))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (l_m * l_m) / Om;
double t_2 = fma(-2.0, t_1, t);
double t_3 = (2.0 * n) * U;
double t_4 = t_3 * ((t - (2.0 * t_1)) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_4 <= 5e-295) {
tmp = sqrt((((t_2 * n) * U) * 2.0));
} else if (t_4 <= 4e+289) {
tmp = sqrt((t_3 * t_2));
} else {
tmp = sqrt((2.0 * (((U * U_42_) * ((l_m * l_m) * (n * n))) / (Om * Om))));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(l_m * l_m) / Om) t_2 = fma(-2.0, t_1, t) t_3 = Float64(Float64(2.0 * n) * U) t_4 = Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_4 <= 5e-295) tmp = sqrt(Float64(Float64(Float64(t_2 * n) * U) * 2.0)); elseif (t_4 <= 4e+289) tmp = sqrt(Float64(t_3 * t_2)); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * U_42_) * Float64(Float64(l_m * l_m) * Float64(n * n))) / Float64(Om * Om)))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * t$95$1 + t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 5e-295], N[Sqrt[N[(N[(N[(t$95$2 * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 4e+289], N[Sqrt[N[(t$95$3 * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(U * U$42$), $MachinePrecision] * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \mathsf{fma}\left(-2, t\_1, t\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := t\_3 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_4 \leq 5 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{\left(\left(t\_2 \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot U*\right) \cdot \left(\left(l\_m \cdot l\_m\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*)))) < 5.00000000000000008e-295Initial program 14.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.6
Applied rewrites50.6%
if 5.00000000000000008e-295 < (*.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.0000000000000002e289Initial program 97.1%
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-*.f6487.8
Applied rewrites87.8%
if 4.0000000000000002e289 < (*.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 23.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-*.f6424.1
Applied rewrites24.1%
Taylor expanded in U around 0
Applied rewrites24.2%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (/ (* l_m l_m) Om)) (t_2 (fma -2.0 t_1 t)) (t_3 (* (* 2.0 n) U)))
(if (<=
(sqrt
(* t_3 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))
1e-147)
(sqrt (* (* (* t_2 n) U) 2.0))
(sqrt (* t_3 t_2)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (l_m * l_m) / Om;
double t_2 = fma(-2.0, t_1, t);
double t_3 = (2.0 * n) * U;
double tmp;
if (sqrt((t_3 * ((t - (2.0 * t_1)) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 1e-147) {
tmp = sqrt((((t_2 * n) * U) * 2.0));
} else {
tmp = sqrt((t_3 * t_2));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(l_m * l_m) / Om) t_2 = fma(-2.0, t_1, t) t_3 = Float64(Float64(2.0 * n) * U) tmp = 0.0 if (sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_))))) <= 1e-147) tmp = sqrt(Float64(Float64(Float64(t_2 * n) * U) * 2.0)); else tmp = sqrt(Float64(t_3 * t_2)); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * t$95$1 + t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1e-147], N[Sqrt[N[(N[(N[(t$95$2 * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$3 * t$95$2), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \mathsf{fma}\left(-2, t\_1, t\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
\mathbf{if}\;\sqrt{t\_3 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 10^{-147}:\\
\;\;\;\;\sqrt{\left(\left(t\_2 \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_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.9999999999999997e-148Initial program 17.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.8
Applied rewrites54.8%
if 9.9999999999999997e-148 < (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 54.6%
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-*.f6449.0
Applied rewrites49.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<=
(sqrt
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))
1e-147)
(sqrt (* (* (+ n n) t) U))
(sqrt (* (* (* U n) t) 2.0))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 1e-147) {
tmp = sqrt((((n + n) * t) * U));
} else {
tmp = sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
l_m = private
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_m, 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_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) - ((n * ((l_m / om) ** 2.0d0)) * (u - u_42))))) <= 1d-147) then
tmp = sqrt((((n + n) * t) * u))
else
tmp = sqrt((((u * n) * t) * 2.0d0))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * Math.pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 1e-147) {
tmp = Math.sqrt((((n + n) * t) * U));
} else {
tmp = Math.sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * math.pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 1e-147: tmp = math.sqrt((((n + n) * t) * U)) else: tmp = math.sqrt((((U * n) * t) * 2.0)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_))))) <= 1e-147) tmp = sqrt(Float64(Float64(Float64(n + n) * t) * U)); else tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * ((l_m / Om) ^ 2.0)) * (U - U_42_))))) <= 1e-147) tmp = sqrt((((n + n) * t) * U)); else tmp = sqrt((((U * n) * t) * 2.0)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, 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$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1e-147], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * t), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 10^{-147}:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot t\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\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.9999999999999997e-148Initial program 17.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6452.3
Applied rewrites52.3%
Applied rewrites52.3%
Applied rewrites52.3%
if 9.9999999999999997e-148 < (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 54.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6436.2
Applied rewrites36.2%
Applied rewrites39.7%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<=
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U U*))))
2e-292)
(sqrt (* (* (* U t) n) 2.0))
(sqrt (* (* (* U n) t) 2.0))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))) <= 2e-292) {
tmp = sqrt((((U * t) * n) * 2.0));
} else {
tmp = sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
l_m = private
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_m, 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_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) - ((n * ((l_m / om) ** 2.0d0)) * (u - u_42)))) <= 2d-292) then
tmp = sqrt((((u * t) * n) * 2.0d0))
else
tmp = sqrt((((u * n) * t) * 2.0d0))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * Math.pow((l_m / Om), 2.0)) * (U - U_42_)))) <= 2e-292) {
tmp = Math.sqrt((((U * t) * n) * 2.0));
} else {
tmp = Math.sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if (((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * math.pow((l_m / Om), 2.0)) * (U - U_42_)))) <= 2e-292: tmp = math.sqrt((((U * t) * n) * 2.0)) else: tmp = math.sqrt((((U * n) * t) * 2.0)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))) <= 2e-292) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if ((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * ((l_m / Om) ^ 2.0)) * (U - U_42_)))) <= 2e-292) tmp = sqrt((((U * t) * n) * 2.0)); else tmp = sqrt((((U * n) * t) * 2.0)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-292], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq 2 \cdot 10^{-292}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\end{array}
\end{array}
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*)))) < 2.0000000000000001e-292Initial program 16.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6447.3
Applied rewrites47.3%
Applied rewrites49.3%
if 2.0000000000000001e-292 < (*.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 56.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6436.7
Applied rewrites36.7%
Applied rewrites39.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U 1.4e+199) (sqrt (fma (/ (* (* U l_m) (* n l_m)) Om) -4.0 (* (* (* n t) U) 2.0))) (* (sqrt (* n t)) (sqrt (* U 2.0)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 1.4e+199) {
tmp = sqrt(fma((((U * l_m) * (n * l_m)) / Om), -4.0, (((n * t) * U) * 2.0)));
} else {
tmp = sqrt((n * t)) * sqrt((U * 2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= 1.4e+199) tmp = sqrt(fma(Float64(Float64(Float64(U * l_m) * Float64(n * l_m)) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); else tmp = Float64(sqrt(Float64(n * t)) * sqrt(Float64(U * 2.0))); end return tmp end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 1.4e+199], N[Sqrt[N[(N[(N[(N[(U * l$95$m), $MachinePrecision] * N[(n * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.4 \cdot 10^{+199}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(U \cdot l\_m\right) \cdot \left(n \cdot l\_m\right)}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{U \cdot 2}\\
\end{array}
\end{array}
if U < 1.40000000000000005e199Initial program 50.2%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6448.8
Applied rewrites48.8%
Applied rewrites56.3%
if 1.40000000000000005e199 < U Initial program 22.0%
Applied rewrites50.3%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-unprodN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
Applied rewrites50.3%
Taylor expanded in n around 0
lower-*.f6487.9
Applied rewrites87.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= U -7.3e-124)
(sqrt (* (* (* U n) t) 2.0))
(if (<= U -3.4e-153)
(/ (* (sqrt (* (* U* U) 2.0)) (* l_m n)) Om)
(if (<= U 4.3e-303)
(sqrt (* (* (* U t) n) 2.0))
(* (sqrt (* (* 2.0 n) t)) (sqrt U))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -7.3e-124) {
tmp = sqrt((((U * n) * t) * 2.0));
} else if (U <= -3.4e-153) {
tmp = (sqrt(((U_42_ * U) * 2.0)) * (l_m * n)) / Om;
} else if (U <= 4.3e-303) {
tmp = sqrt((((U * t) * n) * 2.0));
} else {
tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
}
return tmp;
}
l_m = private
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_m, 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_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= (-7.3d-124)) then
tmp = sqrt((((u * n) * t) * 2.0d0))
else if (u <= (-3.4d-153)) then
tmp = (sqrt(((u_42 * u) * 2.0d0)) * (l_m * n)) / om
else if (u <= 4.3d-303) then
tmp = sqrt((((u * t) * n) * 2.0d0))
else
tmp = sqrt(((2.0d0 * n) * t)) * sqrt(u)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -7.3e-124) {
tmp = Math.sqrt((((U * n) * t) * 2.0));
} else if (U <= -3.4e-153) {
tmp = (Math.sqrt(((U_42_ * U) * 2.0)) * (l_m * n)) / Om;
} else if (U <= 4.3e-303) {
tmp = Math.sqrt((((U * t) * n) * 2.0));
} else {
tmp = Math.sqrt(((2.0 * n) * t)) * Math.sqrt(U);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= -7.3e-124: tmp = math.sqrt((((U * n) * t) * 2.0)) elif U <= -3.4e-153: tmp = (math.sqrt(((U_42_ * U) * 2.0)) * (l_m * n)) / Om elif U <= 4.3e-303: tmp = math.sqrt((((U * t) * n) * 2.0)) else: tmp = math.sqrt(((2.0 * n) * t)) * math.sqrt(U) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= -7.3e-124) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); elseif (U <= -3.4e-153) tmp = Float64(Float64(sqrt(Float64(Float64(U_42_ * U) * 2.0)) * Float64(l_m * n)) / Om); elseif (U <= 4.3e-303) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); else tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= -7.3e-124) tmp = sqrt((((U * n) * t) * 2.0)); elseif (U <= -3.4e-153) tmp = (sqrt(((U_42_ * U) * 2.0)) * (l_m * n)) / Om; elseif (U <= 4.3e-303) tmp = sqrt((((U * t) * n) * 2.0)); else tmp = sqrt(((2.0 * n) * t)) * sqrt(U); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, -7.3e-124], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[U, -3.4e-153], N[(N[(N[Sqrt[N[(N[(U$42$ * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision], If[LessEqual[U, 4.3e-303], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -7.3 \cdot 10^{-124}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{elif}\;U \leq -3.4 \cdot 10^{-153}:\\
\;\;\;\;\frac{\sqrt{\left(U* \cdot U\right) \cdot 2} \cdot \left(l\_m \cdot n\right)}{Om}\\
\mathbf{elif}\;U \leq 4.3 \cdot 10^{-303}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < -7.3e-124Initial program 60.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6444.0
Applied rewrites44.0%
Applied rewrites47.3%
if -7.3e-124 < U < -3.3999999999999998e-153Initial program 42.1%
Taylor expanded in U* around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6460.5
Applied rewrites60.5%
Applied rewrites60.8%
if -3.3999999999999998e-153 < U < 4.29999999999999981e-303Initial program 41.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6429.9
Applied rewrites29.9%
Applied rewrites38.2%
if 4.29999999999999981e-303 < U Initial program 44.1%
Applied rewrites46.7%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U 1.4e+199) (sqrt (* (* (* (fma -2.0 (/ (* l_m l_m) Om) t) n) U) 2.0)) (* (sqrt (* n t)) (sqrt (* U 2.0)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 1.4e+199) {
tmp = sqrt((((fma(-2.0, ((l_m * l_m) / Om), t) * n) * U) * 2.0));
} else {
tmp = sqrt((n * t)) * sqrt((U * 2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= 1.4e+199) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l_m * l_m) / Om), t) * n) * U) * 2.0)); else tmp = Float64(sqrt(Float64(n * t)) * sqrt(Float64(U * 2.0))); end return tmp end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 1.4e+199], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.4 \cdot 10^{+199}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{l\_m \cdot l\_m}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{U \cdot 2}\\
\end{array}
\end{array}
if U < 1.40000000000000005e199Initial program 50.2%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6447.9
Applied rewrites47.9%
if 1.40000000000000005e199 < U Initial program 22.0%
Applied rewrites50.3%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-unprodN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
Applied rewrites50.3%
Taylor expanded in n around 0
lower-*.f6487.9
Applied rewrites87.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= U -2.1e-61)
(sqrt (* (* (* U n) t) 2.0))
(if (<= U 4.3e-303)
(sqrt (* (* (* U t) n) 2.0))
(* (sqrt (* (* 2.0 n) t)) (sqrt U)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -2.1e-61) {
tmp = sqrt((((U * n) * t) * 2.0));
} else if (U <= 4.3e-303) {
tmp = sqrt((((U * t) * n) * 2.0));
} else {
tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
}
return tmp;
}
l_m = private
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_m, 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_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= (-2.1d-61)) then
tmp = sqrt((((u * n) * t) * 2.0d0))
else if (u <= 4.3d-303) then
tmp = sqrt((((u * t) * n) * 2.0d0))
else
tmp = sqrt(((2.0d0 * n) * t)) * sqrt(u)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -2.1e-61) {
tmp = Math.sqrt((((U * n) * t) * 2.0));
} else if (U <= 4.3e-303) {
tmp = Math.sqrt((((U * t) * n) * 2.0));
} else {
tmp = Math.sqrt(((2.0 * n) * t)) * Math.sqrt(U);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= -2.1e-61: tmp = math.sqrt((((U * n) * t) * 2.0)) elif U <= 4.3e-303: tmp = math.sqrt((((U * t) * n) * 2.0)) else: tmp = math.sqrt(((2.0 * n) * t)) * math.sqrt(U) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= -2.1e-61) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); elseif (U <= 4.3e-303) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); else tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= -2.1e-61) tmp = sqrt((((U * n) * t) * 2.0)); elseif (U <= 4.3e-303) tmp = sqrt((((U * t) * n) * 2.0)); else tmp = sqrt(((2.0 * n) * t)) * sqrt(U); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, -2.1e-61], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 4.3e-303], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -2.1 \cdot 10^{-61}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{elif}\;U \leq 4.3 \cdot 10^{-303}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < -2.0999999999999999e-61Initial program 67.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
Applied rewrites55.2%
if -2.0999999999999999e-61 < U < 4.29999999999999981e-303Initial program 41.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6424.5
Applied rewrites24.5%
Applied rewrites30.7%
if 4.29999999999999981e-303 < U Initial program 44.1%
Applied rewrites46.7%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= U -2.1e-61)
(sqrt (* (* (* U n) t) 2.0))
(if (<= U 1.5e-292)
(sqrt (* (* (* U t) n) 2.0))
(* (sqrt (* n t)) (sqrt (* U 2.0))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -2.1e-61) {
tmp = sqrt((((U * n) * t) * 2.0));
} else if (U <= 1.5e-292) {
tmp = sqrt((((U * t) * n) * 2.0));
} else {
tmp = sqrt((n * t)) * sqrt((U * 2.0));
}
return tmp;
}
l_m = private
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_m, 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_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= (-2.1d-61)) then
tmp = sqrt((((u * n) * t) * 2.0d0))
else if (u <= 1.5d-292) then
tmp = sqrt((((u * t) * n) * 2.0d0))
else
tmp = sqrt((n * t)) * sqrt((u * 2.0d0))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= -2.1e-61) {
tmp = Math.sqrt((((U * n) * t) * 2.0));
} else if (U <= 1.5e-292) {
tmp = Math.sqrt((((U * t) * n) * 2.0));
} else {
tmp = Math.sqrt((n * t)) * Math.sqrt((U * 2.0));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= -2.1e-61: tmp = math.sqrt((((U * n) * t) * 2.0)) elif U <= 1.5e-292: tmp = math.sqrt((((U * t) * n) * 2.0)) else: tmp = math.sqrt((n * t)) * math.sqrt((U * 2.0)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= -2.1e-61) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); elseif (U <= 1.5e-292) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); else tmp = Float64(sqrt(Float64(n * t)) * sqrt(Float64(U * 2.0))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= -2.1e-61) tmp = sqrt((((U * n) * t) * 2.0)); elseif (U <= 1.5e-292) tmp = sqrt((((U * t) * n) * 2.0)); else tmp = sqrt((n * t)) * sqrt((U * 2.0)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, -2.1e-61], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 1.5e-292], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq -2.1 \cdot 10^{-61}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{elif}\;U \leq 1.5 \cdot 10^{-292}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{U \cdot 2}\\
\end{array}
\end{array}
if U < -2.0999999999999999e-61Initial program 67.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
Applied rewrites55.2%
if -2.0999999999999999e-61 < U < 1.50000000000000008e-292Initial program 40.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6425.2
Applied rewrites25.2%
Applied rewrites31.2%
if 1.50000000000000008e-292 < U Initial program 44.8%
Applied rewrites46.6%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-unprodN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
Applied rewrites46.6%
Taylor expanded in n around 0
lower-*.f6450.8
Applied rewrites50.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n 2e-267) (sqrt (* (* (+ n n) t) U)) (* (sqrt (* 2.0 (* U t))) (sqrt n))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= 2e-267) {
tmp = sqrt((((n + n) * t) * U));
} else {
tmp = sqrt((2.0 * (U * t))) * sqrt(n);
}
return tmp;
}
l_m = private
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_m, 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_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (n <= 2d-267) then
tmp = sqrt((((n + n) * t) * u))
else
tmp = sqrt((2.0d0 * (u * t))) * sqrt(n)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= 2e-267) {
tmp = Math.sqrt((((n + n) * t) * U));
} else {
tmp = Math.sqrt((2.0 * (U * t))) * Math.sqrt(n);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= 2e-267: tmp = math.sqrt((((n + n) * t) * U)) else: tmp = math.sqrt((2.0 * (U * t))) * math.sqrt(n) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= 2e-267) tmp = sqrt(Float64(Float64(Float64(n + n) * t) * U)); else tmp = Float64(sqrt(Float64(2.0 * Float64(U * t))) * sqrt(n)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (n <= 2e-267) tmp = sqrt((((n + n) * t) * U)); else tmp = sqrt((2.0 * (U * t))) * sqrt(n); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, 2e-267], N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * t), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq 2 \cdot 10^{-267}:\\
\;\;\;\;\sqrt{\left(\left(n + n\right) \cdot t\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot t\right)} \cdot \sqrt{n}\\
\end{array}
\end{array}
if n < 2e-267Initial program 46.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6444.0
Applied rewrites44.0%
Applied rewrites44.0%
Applied rewrites44.0%
if 2e-267 < n Initial program 51.7%
Applied rewrites19.1%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-unprodN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
Applied rewrites19.1%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites40.6%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f6440.9
Applied rewrites40.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* (* (+ n n) t) U)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((((n + n) * t) * U));
}
l_m = private
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_m, 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_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((n + n) * t) * u))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt((((n + n) * t) * U));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((((n + n) * t) * U))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(Float64(Float64(n + n) * t) * U)) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((((n + n) * t) * U)); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(n + n), $MachinePrecision] * t), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left(\left(n + n\right) \cdot t\right) \cdot U}
\end{array}
Initial program 48.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6438.7
Applied rewrites38.7%
Applied rewrites38.7%
Applied rewrites38.7%
herbie shell --seed 2024346
(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*))))))