@Carl Love I can't really understand how the process of QR:= proc(N::integer, n::integer) local r, q:= iquo(N,n,r); [q,r] end proc: execute in maple,can briefly explain?
Besides, suppose that I have z:=010100111 and rn:=10010,thus by using the source code above that provided by you instead of write &B QR(010100111, 10010); do I can write &B QR(z, rn) to get the similar answer [1001,101]. I ask this is because for your method you just need to write the number 010100111, 10010 inside the bracket but for me i have a scenario that my value of 010100111, 10010 is get from another binary arithmetic and random number generation respectively.For instance,
z := binaryAdd(100,111); #answer is 1011
q := rand(0 .. 2^(length(z)-1));
rn := convert(p(), binary) #Assume we get answer 110
Then can I write &B QR(z, rn) instead of &B QR(1011,110) to get the same answer. If cannot, do the source code can be modified so that I can use the method of &B QR(z, rn) to get the answer of &B QR(1011,110)? Kindly help with thanks,hope you and others as well can understand the question.