Results 1 to 40 of 74

Thread: Prime Numbers

Threaded View

  1. #38
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    Re: Prime Numbers

    Quote Originally Posted by storm5510 View Post
    When you say "random access" do you actually mean sequential? You are writing them one following the previous?

    I thought about other file modes. .Net is a little tricky on that. I have no good examples to follow. Besides, I'm already back up to 1.6 GB of data.
    No, it's not a sequential file, even though it is being assembled one record at a time. When built, any record on the file can then be accessed by an immediate leap to a specifiic record--such as record number 100 million, and the prime number can be immediately revealed. The only thing I have to do in code is examine the value of the desired prime number. If over 2^31, then I switch to the big primes being stored as currency.

    Your progess is excellent. The value of the most recent prime that I have collected is about 6.9 billion. Total file size has now reached 2 GB.
    Last edited by Code Doc; Sep 30th, 2009 at 07:35 PM.
    Doctor Ed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width