38 carry= (carry>>16) + a.
v[i] + b.
v[i];
48 carry= (carry>>16) + a.
v[i] - b.
v[i];
70 memset(&out, 0,
sizeof(out));
77 carry= (carry>>16) + out.
v[j] + a.
v[i]*b.
v[j-i];
88 if(v)
return (v>>16)|1;
91 int v= a.
v[i] - b.
v[i];
92 if(v)
return (v>>16)|1;
102 unsigned int index= i + (s>>4);
104 if(index+1<AV_INTEGER_SIZE) v = a.
v[index+1]<<16;
105 if(index <AV_INTEGER_SIZE) v+= a.
v[
index ];
106 out.
v[i]= v >> (s&15);
114 if(!quot) quot = "_temp;
163 out = (out<<16) + a.
v[i];
171 0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
172 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
173 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
174 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
175 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
176 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
177 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
178 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
184 for(a=7; a<256*256*256; a+=13215){
185 for(b=3; b<256*256*256; b+=27118){
int av_log2_16bit(unsigned v)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
uint16_t v[AV_INTEGER_SIZE]
int64_t av_i2int(AVInteger a)
Convert the given AVInteger to an int64_t.
AVInteger av_int2i(int64_t a)
Convert the given int64_t to an AVInteger.
int av_log2_i(AVInteger a)
Return the rounded-down value of the base 2 logarithm of the given AVInteger.
AVInteger av_mul_i(AVInteger a, AVInteger b)
simple assert() macros that are a bit more flexible than ISO C assert().
int av_cmp_i(AVInteger a, AVInteger b)
Return 0 if a==b, 1 if a>b and -1 if a<b.
AVInteger av_add_i(AVInteger a, AVInteger b)
const uint8_t ff_log2_tab[256]
static const AVInteger zero_i
AVInteger av_sub_i(AVInteger a, AVInteger b)
AVInteger av_shr_i(AVInteger a, int s)
bitwise shift
arbitrary precision integers
AVInteger av_mod_i(AVInteger *quot, AVInteger a, AVInteger b)
Return a % b.
common internal and external API header
AVInteger av_div_i(AVInteger a, AVInteger b)
Return a/b.
int main(int argc, char **argv)