50 integer(kind=8),
value :: ival
52 integer(kind=8),
parameter :: one=1
53 if(ival+one<ival)
then
67 integer(kind=4),
value :: ival
69 integer(kind=4),
parameter :: one=1
70 if(ival+one<ival)
then
84 integer(kind=2),
value :: ival
86 integer(kind=2),
parameter :: one = 1_2
87 if(ival+one<ival)
then
101 integer(kind=1),
value :: ival
103 integer(kind=1),
parameter :: one = 1_1
104 if(ival+one<ival)
then
117 integer(kind=8),
value :: i_in
122 if(iand(i,i-1)/=0)
then
126 if(iand(i,z
'FFFFFFFF00000000')/=0)
then
131 if(iand(i,z
'00000000FFFF0000')/=0)
then
136 if(iand(i,z
'000000000000FF00')/=0)
then
141 if(iand(i,z
'00000000000000F0')/=0)
then
146 if(iand(i,z
'000000000000000C')/=0)
then
151 if(iand(i,z
'0000000000000002')/=0)
then
164 integer(kind=4),
value :: i_in
169 if(iand(i,i-1)/=0)
then
173 if(iand(i,z
'FFFF0000')/=0)
then
178 if(iand(i,z
'0000FF00')/=0)
then
183 if(iand(i,z
'000000F0')/=0)
then
188 if(iand(i,z
'0000000C')/=0)
then
193 if(iand(i,z
'00000002')/=0)
then
206 integer(kind=2),
value :: i_in
211 if(iand(i,int(i-1,kind=2))/=0)
then
215 if(iand(i,z
'FF00')/=0)
then
220 if(iand(i,z
'00F0')/=0)
then
225 if(iand(i,z
'000C')/=0)
then
230 if(iand(i,z
'0002')/=0)
then
243 integer(kind=1),
value :: i_in
248 if(iand(i,int(i-1,kind=1))/=0)
then
252 if(iand(i,z
'F0')/=0)
then
257 if(iand(i,z
'0C')/=0)
then
262 if(iand(i,z
'02')/=0)
then
Define math functions used by compack(), simpack(), and misspack().
integer(kind=1) function i1log2_1(ival)
This function returns log(x+1)/log(2) unless x=maxint, in which case log(x)/log(2) for 1 bit integer ...
integer(kind=4) function i1log2_4(ival)
This function returns log(x+1)/log(2) unless x=maxint, in which case log(x)/log(2) for 4 bit integer ...
integer(kind=4) function ilog2_4(i_in)
This function returns log(x)/log(2) for 4 bit integer numbers.
integer(kind=2) function i1log2_2(ival)
This function returns log(x+1)/log(2) unless x=maxint, in which case log(x)/log(2) for 2 bit integer ...
integer(kind=2) function ilog2_2(i_in)
This function returns log(x)/log(2) for 2 bit integer numbers.
integer(kind=8) function i1log2_8(ival)
This function returns log(x+1)/log(2) unless x=maxint, in which case log(x)/log(2) for 8 bit integer ...
integer(kind=8) function ilog2_8(i_in)
This function returns log(x)/log(2) for 8 bit integer numbers.
integer(kind=1) function ilog2_1(i_in)
This function returns log(x)/log(2) for 1 bit integer numbers.