Rank: 99277 based on 0 downloads (last 30 days) and 0 file submitted
photo

Sarla

E-mail

Personal Profile:

studying in final year of B.Tech course. discipline- electronics and communication


 

Watch this Author's files

 

Comments and Ratings by Sarla View all
Updated File Comments Rating
12 Jun 2011 Variable Precision Integer Arithmetic Arithmetic with integers of fully arbitrary size. Arrays and vectors of vpi numbers are supported. Author: John D'Errico

:) that disp was a later addition,since i was trying to forcibly stuff an enormous number into a vpi variable. i think the error is in the variable out. i am still running a few tests.

actually i rather like the randint function. it made my life slightly simpler.

thank you!!

12 Jun 2011 Variable Precision Integer Arithmetic Arithmetic with integers of fully arbitrary size. Arrays and vectors of vpi numbers are supported. Author: John D'Errico

ok i should have been clear. my mistake. both invk and prod (i'll change the name) are vpi variables. those values were arrived at after some calculations(i copied those values from the command terminal). therefore i do not have the option of providing those values to vpi as strings.
my actual code is like this:
invk=minv(k,PointOrder)% k and PointOrder are user defined vpi variables

prod1=vpi(da*r)% da and r are user defined vpi variables

s=vpi(mod(vpi(disp(invk))*vpi((disp(out)+disp(prod1))),vpi(PointOrder)))

in a case like the above one what can i do?

also regarding the randint function i am using it to generate private keys when dealing with vpi variables! but my slow processor takes too long to perform certain calculations. so now i use a mix of randint and randomnum in my program depending upon the precision i need.

11 Jun 2011 Variable Precision Integer Arithmetic Arithmetic with integers of fully arbitrary size. Arrays and vectors of vpi numbers are supported. Author: John D'Errico

hi
i am having an issue with performing certain calculations on vpi numbers.
i have a vpi variable
invk = 5431182971659226082032497739807769284499946472968309173822

i have another variable
prod =
66634193303502359521887744541301070677802959088568215854843250

now i have this expression
s=vpi(mod((vpi(invk)*vpi(out))
+prod)),vpi(PointOrder)))

now the program works fine until the value of prod. but it comes to a complete halt when it comes to s.
and i get an error of the form :
??? Error using ==> vpi.vpi at 141
If N is a double, it may be no larger than 2^53 - 1

Error in ==> vpi.plus at 51
INT1 = vpi(INT1);

Error in ==> dsaforlargenumbers at 98
s=vpi(mod(vpi(invk)*vpi((out+prod)),PointOrder))

could you help me out?

10 Jun 2011 Variable Precision Integer Arithmetic Arithmetic with integers of fully arbitrary size. Arrays and vectors of vpi numbers are supported. Author: John D'Errico

yup you are right. i did not really explore isprime for vpi.

is there any function other than randint to generate pseudo random numbers for vpi?

06 Jun 2011 Variable Precision Integer Arithmetic Arithmetic with integers of fully arbitrary size. Arrays and vectors of vpi numbers are supported. Author: John D'Errico

:) so even the stupidest of questions have their uses!
i realized that i could use the factor in vpi to test whether or not a number is prime. like this:

fac=factor(vpi(p));
if length(fac)==1
thetruth=1;
else
thetruth=0;
end
i.e. if the length were 1 the number would be prime! this way i don't really have to bother with primality tests!

Contact us