0

I have an embedded device using the standard glibc srand()/rand() functions to generate pseudo-random values. For the same seed x I need to get the same values for rand() on a Windows machine. To my surpise however, this isn't as simple as it seems.

Glibc apparently used two algorithms for it's random number generator. An older one, described here, and a newer one, which my embedded device uses. How can I implement the latter on another platform? My knowlegde of C isn't thorough enough to understand what exactly is happening there.

Community
  • 1
  • 1
Peter Van Akelyen
  • 127
  • 1
  • 1
  • 6
  • 2
    Why not try to compile it on Windows and work through the errors? You might get better/easier results if you use a MinGW compiler. Of course there might also be licensing issues, if your Windows application can't be GPL licensed. – Michael Burr Nov 02 '14 at 18:38
  • In the end, this was the way to go (and therefore the answer of my question). – Peter Van Akelyen Nov 21 '14 at 20:31

0 Answers0