0

I am trying to generate a (pseudo) random number between 0 and 1 without using any functions like rand() or srand(). I found some answers here but none fit my problem.

I was thinking about something like

  • declaring a variable and getting a pointer to that variable
  • add a number to the pointer to get another pointer to a unknown memory address (I know it is bad practise)
  • doing some modulo operations and some bit shifting on the new variable I would like it to be as distributed as possible

thanks!

cmplx96
  • 1,541
  • 8
  • 34
  • 48

0 Answers0