1 Billion digit prime
Re: 1 Billion digit prime
I suspect your result is it is correct. I can't wait when I have time to check out your code.
Re: 1 Billion digit prime
As of January 2014, the largest known prime number is 257,885,161 − 1,[1] a number with 17,425,170 digits.
http://en.wikipedia.org/wiki/Largest_known_prime_number
http://en.wikipedia.org/wiki/Largest_known_prime_number
Re: 1 Billion digit prime
There is the possibility that the result is incorrect but I have tested the method with smaller numbers that GMP/MPIR could multiply. The result where equal therefore the method used should give a correct answer.
But only a straight forward multiply will give a answer on the question of result is this method is correct.
My next computer will definitely have more memory so I can calculate this sort of things directly.
But only a straight forward multiply will give a answer on the question of result is this method is correct.
My next computer will definitely have more memory so I can calculate this sort of things directly.
Re: 1 Billion digit prime
Hi frisian, I'm home now and anxious to test your code. If possible can you help walk me through the install of MPIR. Please feel free to communicate with me via this forum, email or phone. My email is opreese@gmail.com and cell# is 407-655-8537. Thanks Owen P. Reese.
Re: 1 Billion digit prime
Actually, I extend my invite to communicate with me to all freebasic programmers via my cell# as I prefer voice comms since I drive a truck for a living and am unable to text and drive.
Re: 1 Billion digit prime
I am not sure that MPIR is any faster than GMP anymore, the latest release of GMP has improved quite a bit.
Re: 1 Billion digit prime
just tested mpir versus gmp and gmp is just a bit faster, so I suggest using gmp.
Re: 1 Billion digit prime
@ srvaldez
wasn't just about speed. gmp memory limits was what i was having problemes with last year.
wasn't just about speed. gmp memory limits was what i was having problemes with last year.
Re: 1 Billion digit prime
hello owen
can you give an example which caused gmp to fail? perhaps the latest release has fixed the problem.
can you give an example which caused gmp to fail? perhaps the latest release has fixed the problem.
Re: 1 Billion digit prime
sure, try using gmp to calculate xxx factorial till the product is apx 1 billion decimal digits.
Re: 1 Billion digit prime
Were you testing with a 32-bit version of gmp or 64-bit? There is an apparently broken link to a 64-bit version in the reply here:
http://sourceforge.net/p/mingw-w64/disc ... 5e0ad#b0cf
So it looks like a 64-bit version has been available for 4+ years.
http://sourceforge.net/p/mingw-w64/disc ... 5e0ad#b0cf
So it looks like a 64-bit version has been available for 4+ years.
Re: 1 Billion digit prime
I was Using a 32 bit. Now I remember it wasn't gmp.
Winxp memory cap limited gmp.
Winxp memory cap limited gmp.
Re: 1 Billion digit prime
I don't know how to do this stuff anymore. For example my original program uses gmp.bi which is part of FB's install package and in order to get it to work I needed a DLL file (libgmp-3.dll)
frisian uses mpir.bi but I have no clue how to build it and or if it requires a DLL file.
srvaldez suggests using a newer version of gmp but I have no idea how to use the newer versions.
frisian uses mpir.bi but I have no clue how to build it and or if it requires a DLL file.
srvaldez suggests using a newer version of gmp but I have no idea how to use the newer versions.
Re: 1 Billion digit prime
hello owen
what I do is copy the bi files to the FreeBasic inc folder and copy the *.dll.a files to the FreeBasic lib\win32 folder and the dll's I copy to the windows\system32 folder if your OS is Windows 32-bit, if your OS is Windows 64-bit then the 32-bit dll's go into syswow64 and the 64-bit dll's go into system32, that's counterintuitive I know but that's the way it is.
here's an example by MichaelW http://www.freebasic.net/forum/viewtopi ... ilit=brent
what I do is copy the bi files to the FreeBasic inc folder and copy the *.dll.a files to the FreeBasic lib\win32 folder and the dll's I copy to the windows\system32 folder if your OS is Windows 32-bit, if your OS is Windows 64-bit then the 32-bit dll's go into syswow64 and the 64-bit dll's go into system32, that's counterintuitive I know but that's the way it is.
here's an example by MichaelW http://www.freebasic.net/forum/viewtopi ... ilit=brent
Last edited by srvaldez on Apr 17, 2014 13:33, edited 2 times in total.
Re: 1 Billion digit prime
hello owen
I went ahead and compiled your mymultgmp using FB 0.91_x64 as provided by MOD and run yor program, the computation took less than 20 minutes.
but the result is too big for me to upload to media fire.
I went ahead and compiled your mymultgmp using FB 0.91_x64 as provided by MOD and run yor program, the computation took less than 20 minutes.
but the result is too big for me to upload to media fire.
Last edited by srvaldez on Apr 16, 2014 12:23, edited 1 time in total.