This is an example of multiplying a big integer to a list of integers.
3792538124902347509274019274102947 * {2352, 4981, 6492, 3469, 2093, 1049, 5482, 5932, 1923, 7912}
{8920049669770321341812493332690131344,
18890632400138592943693890004306779007,
24621157506866040030206933127476331924,
13156314755286243509671572861863123143,
7937782295420613336910522340697468071,
3978372493022562537228446218533991403,
20790694000714669045840173660632355454,
22497336156920725425013482333978681604,
7293050814187214260333939064099967081,
30006561644227373493376040496702516664}
Note that 3792538124902347509274019274102947
is 34-digit number.
Each element in the list is 4-digit number and there are 10 elements in the list.
To generate the output, we had done
1-digit multiply 1-digit : 34*4*10==1360
times
34~37-digit plus 34~37-digit : 3*10
times (to add four numbers, we plus three times)
Suppose that we have following multiplication table before :
3792538124902347509274019274102947*0==0
3792538124902347509274019274102947*1==3792538124902347509274019274102947
3792538124902347509274019274102947*2==7585076249804695018548038548205894
3792538124902347509274019274102947*3==11377614374707042527822057822308841
3792538124902347509274019274102947*4==15170152499609390037096077096411788
3792538124902347509274019274102947*5==18962690624511737546370096370514735
3792538124902347509274019274102947*6==22755228749414085055644115644617682
3792538124902347509274019274102947*7==26547766874316432564918134918720629
3792538124902347509274019274102947*8==30340304999218780074192154192823576
3792538124902347509274019274102947*9==34132843124121127583466173466926523
Then we need
1-digit multiply 1-digit : 0
times
34~37-digit plus 34~37-digit : 3*10
times
So we save 1360 1-digit multiplications in this case.
But I know there are things to be considered carefully :
To use the multiplication table, we have to substitute.
For example, we have to substitute
3792538124902347509274019274102947*5 with 18962690624511737546370096370514735.
Seeking for the multiplication table or substitution itself is also a kind of workload.It is possible that mathematica's built-in feature may already calculated so. I mean mathematica automatically uses optimized method for multiplying a single integer
and a list of integers.CPU works in base 2. My theory is about base 10.. that difference is a little worrisome.
Q) Do you agree that when multiplying
a fixed very big integer and very long list of integers,
it is good to build multiplication table first?