Multiple Precision Signed Integer Package by James Pate Williams, Jr.
I very recently created a multiple precision signed integer package in C++ using the standard library and a base of 10. I then implemented two integer factoring algorithms trial division and Pollard’s Rho method. Trial division uses all the prime numbers <= 10000 and there are 1229 such primes. Due to the choice of language and the exceedingly small base the resulting application is awfully slow when compared to a similar C# application. The multiple precision signed integer package is largely based on translation of the Pascal source code found in “Prime Numbers and Computer Methods for Factorization” by Hans Riesel. The test number is 2 ^ 72 – 1 which is a Mersenne composite integer. The output large integers start with the number of base 10 digits in the number. For comparison I have included the output from my C# Big Integer factorization program as a screen shot.
Menu
0 Exit Application
1 Test of Package
2 Trial Division
3 Pollard Rho
2
n = 4722366482869645213695
Duration (min:sec.mil) = 00:08.784
n is composite, factors:
3 ^ 3 factor has 1 digits
5 factor has 1 digits
7 factor has 1 digits
13 factor has 2 digits
17 factor has 2 digits
19 factor has 2 digits
37 factor has 2 digits
73 factor has 2 digits
109 factor has 3 digits
241 factor has 3 digits
433 factor has 3 digits
Large prime 5 3 8 7 3 7
Menu
0 Exit Application
1 Test of Package
2 Trial Division
3 Pollard Rho
3
n = 4722366482869645213695
n is composite, factors:
2 2 1
1 3
1 3
4 3 5 1 5
2 1 3
4 1 2 4 1
3 2 4 1
3 1 0 9
3 4 3 3
5 3 8 7 3 7
1 3
1 3
1 3
1 5
1 7
2 1 3
2 1 7
2 1 9
2 3 7
2 7 3
3 1 0 9
3 2 4 1
3 4 3 3
5 3 8 7 3 7
Duration (min:sec.mil) = 00:02.197
My whole legal name is James Pate Williams, Jr. I was born in LaGrange, Georgia approximately 70 years ago. I barely graduated from LaGrange High School with low marks in June 1971. Later in June 1979, I graduated from LaGrange College with a Bachelor of Arts in Chemistry with a little over a 3 out 4 Grade Point Average (GPA). In the Spring Quarter of 1978, I taught myself how to program a Texas Instruments desktop programmable calculator and in the Summer Quarter of 1978 I taught myself Dayton BASIC (Beginner's All-purpose Symbolic Instruction Code) on LaGrange College's Data General Eclipse minicomputer. I took courses in BASIC in the Fall Quarter of 1978 and FORTRAN IV (Formula Translator IV) in the Winter Quarter of 1979. Professor Kenneth Cooper, a genius poly-scientist taught me a course in the Intel 8085 microprocessor architecture and assembly and machine language. We would hand assemble our programs and insert the resulting machine code into our crude wooden box computer which was designed and built by Professor Cooper. From 1990 to 1994 I earned a Bachelor of Science in Computer Science from LaGrange College. I had a 4 out of 4 GPA in the period 1990 to 1994. I took courses in C, COBOL, and Pascal during my BS work. After graduating from LaGrange College a second time in May 1994, I taught myself C++. In December 1995, I started using the Internet and taught myself client-server programming. I created a website in 1997 which had C and C# implementations of algorithms from the "Handbook of Applied Cryptography" by Alfred J. Menezes, et. al., and some other cryptography and number theory textbooks and treatises.
View all posts by jamespatewilliamsjr