Sunday, August 5, 2012

GJSieve Issues + Future

Currently, GJSieve's documentation is either sparse or out-of-date (or both) as far as current, known issues are concerned.

The Mac version (0.2a), polished though it may be for a relatively quick job, is somewhat flawed in that it returns incorrect results for some small numbers, namely those where the square root happens to be the first factor. This can be easily solved by testing up to sqrt(N) + 1, which I will implement as soon as I have the time, which won't be for a day or two.

The Windows version (1.7.0b), which has had substantially more development, is arguably more flawed and less efficient than the Mac version due to threading and memory management. It also has a lot of trouble printing files.

I finally figured out that the reason it would not print the whole Proth number when it was very big is because I was using the "int" type to determine the length the string ought to be. "int" only goes up to 65535, so if the Proth number had more digits than that, it would get cut off. I have since changed that so the length is determined by an unsigned long int. If you manage to generate a number with more than 2 billion digits, it will break. You'll also likely set some kind of record.

Version 1.8.0b (Windows) is currently in development. I have already solved the file problem by simply using the standard-C output file stream. It also closes the file properly now, so you no longer have to quit the program to open the file.

Version 1.8.0b is also vectorless, which I thought would substantially reduce memory usage and overall computation time. For whatever reason, that doesn't seem to be the case. I am at a loss as to why the Mac application is 3 to 4 times faster, but I'm not complaining. Windows users might, however, so I'm definitely looking into that.

It's worth noting that with the school year starting for me in about two weeks, sustaining active development will become more difficult, as I'll no longer be able to spend all day every day programming. This doesn't mean I'm going to stop, only that releases will be more spaced out.

I am also planning on porting the multitester (MuPuPriNT) to Mac. This should not be too hard, since it basically involves copying and pasting GJSieve three times, porting the comparatively small IsItPrime?, and writing a simple host application window to tie it all together. That said, I don't plan on being done with that for at least a week, possibly longer.

I will be on vacation the next two weeks in historic Newtown Square, Pennsylvania, where my parents and siblings live. I can work there, but likely won't as much as I do here at college. I'll still post updates, though.

No comments:

Post a Comment