Thread: Finding location in rand()

  1. #1
    Registered User
    Join Date
    Aug 2004

    Finding location in rand()

    Given a large enough set of numbers is it possible to determine the seed and location in the rand() function found in <cstdlib> and seeded using srand?

    I know I can find the seed given the first few numbers (maybe there is a possibility of duplicates but I haven't had that problem) but what if the numbers are located after rand() has been called numerous times.

    If anyone can give me the formula used to calculate the rand() function I might be able to solve this problem.

    Any help would be appreciated.

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Is it possible? Sure.

    As for the formula that would be implamentation defined.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. rand() implementation
    By habert79 in forum C Programming
    Replies: 4
    Last Post: 02-07-2009, 01:18 PM
  2. Finding EXE Location
    By Trent_Easton in forum C Programming
    Replies: 2
    Last Post: 06-18-2005, 08:01 AM
  3. instantiated from here: errors...
    By advocation in forum C++ Programming
    Replies: 5
    Last Post: 03-27-2005, 09:01 AM
  4. I need help with templates!
    By advocation in forum C++ Programming
    Replies: 6
    Last Post: 03-26-2005, 09:27 PM
  5. Im so lost at . .
    By hermit in forum C Programming
    Replies: 18
    Last Post: 05-15-2002, 01:26 AM