Instructions
1 - Enter number (max: 2147483647) to be factored in 1st
box; click 'Factor'
2 - Initial factors will be displayed in remaining boxes;
2nd factor will always be prime
3 - Re-click 'Factor' to generate new factors for 1st
factor; repeat as necessary
4 - 2nd factor box will display 'prime' when number cannot
be factored
5 - To factor additional number(s), click 'Reset' and
begin again with Step 1.
Dear Doves,
I've been studying the High Priest's Breastplate some
more. In the process, I needed to factor some numbers (I also do factoring
on other numbers, too - license plates, phone numbers, zip codes, etc).
Although I had written a simple program many years ago (in Fortran-II,
I think!), I needed something more "accessible"; I have a
lot of
things in my basement, but an IBM 1130 isn't one of them (am I dating myself?).
To make a long story short, I re-wrote it from memory
in Javascript and put in on a web page.
So may I present my Prime Number and Factor Calculator?
Even though it's pretty self-explanatory, I've included instructions anyway.
It's normally very speedy (as in: almost instantaneous). The slowest it
would be is when factoring the largest prime it can handle, which is also
its max value (see below); for that one, it takes about 5 seconds on my
120-Mhz Pentium-I, so you can figure your speed accordingly.
It's limited only by your computer's word length - which
for PCs and Macs is 32-bits - so the largest number it can handle is 2,147,483,647
= 2**31-1 (which is prime, by the way); yet somehow I don't think that
limitation will be a problem for you numerology and gematria types! ;-)
What to do? You can:
-
Bookmark this page (see below) as-is, and hope John doesn't lose it;
or,
-
Copy the code to your own page or website; or,
-
Copy this page to your hard drive (so you don't have to go
online to use it); or,
-
Copy the code to your own page on your hard drive; or,
-
Hack the code to your heart's content; or,
-
Ignore it and leave it to the numbers guys and gals; or,
-
Go read letters that are more interesting than this one.
Just think of it as a ray gun (it looks like one to me!)
to "zap" those tough factoring problems!
-Dave
PS- I put it at the top of the letter so that, if you
bookmark the page, you won't have to scroll down to get to it.
PPS- You need to have Javascript enabled in your browser
to use it (duh).
PPPS- If you have no idea how to enable Javascript, it
probably is already.
PPPPS- If you want to, you can call me Palmoni. <grin>
Thanks Dave. Your program is cool!
John
_____________________________________________________________________