Page 2 of 2

Re: Prime Number Generators

Posted: March 25th, 2017, 5:51 pm
by albinopapa
Yeah more like 18 quintillion

Re: Prime Number Generators

Posted: March 25th, 2017, 10:53 pm
by LuisR14
i guess i went the "long-scale" format :P (with long-scale it'd be 18 Trillion, which i deem the appropriate form, and with short-scale would be 18 Quintillion i guess)

Re: Prime Number Generators

Posted: March 26th, 2017, 5:03 am
by albinopapa
Ah, yeah you ain't that old Luis, and you live in 'Merica lol.

I had to look this up since you mentioned "long-scale" and "short-scale".
https://en.wikipedia.org/wiki/Names_of_large_numbers

I had seen a video on this a while back, use to people changed the prefix every million instead of every thousand.

Re: Prime Number Generators

Posted: March 26th, 2017, 5:52 am
by LuisR14
hehe yea, i'm not old, but i'm a US-born hispanic dude, so I basically went with what LatinAmerica uses xD (also because it felt natural to count hundreds, then thousands, then millions, rinse-repeat o_o)

Re: Prime Number Generators

Posted: March 26th, 2017, 6:06 am
by JDB
chili wrote:Yeah, divide only primes, divide only up to sqrt(n), only examine odd numbers.
A long time ago I implemented a string based long division algorithm for this very purpose. It was an interesting little challenge and the resulting algorithm was actually quite fast, I recall getting thousands of digits of decimal precision in microseconds for a division operation. The only limitation was that the divisor could be no more than two digits long, however the dividend could be an arbitrarily large integer, which was a limitation of the long division process I modeled the code after. I think the code is sitting on an old dead hard drive so unfortunately I cannot share it.

EDIT: actually I think I limited the decimal precision because it wasn't really necessary, what actually amazed me was that I could divide an integer with thousands of digits by any two digit integer and got a result in a fraction of a second. However I'm sure there would be ways to extend the algorithm I wrote to support more than a two digit divisor.