How reliable is the Random function in Delphi

前端 未结 9 1303
遥遥无期
遥遥无期 2020-12-30 06:53

I am writing a program which write statistical tests in Delphi (must be Delphi) and I\'ve heard that the Random functionality is somewhat odd. You have to call randomize to

相关标签:
9条回答
  • 2020-12-30 07:27

    If you are seeking a way to guarantee uniqueness of random numbers with the fastest execution time, About.com has created a challenge on Fastest Unique Random Number Generator, and Patrick van Logchem's implementation has been elected as the winner.

    0 讨论(0)
  • 2020-12-30 07:28

    Return random between 0..9

    StrToInt(copy(FloatToStr(Random),4,1))
    

    Note:Check FloatToStr(Random) length before use or use any other digit from the decimal part...

    0 讨论(0)
  • 2020-12-30 07:30

    alt text

    I couldn't resist.

    0 讨论(0)
提交回复
热议问题