home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3539 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: quagga.ru.ac.za!rucus!ray
  2. From: ray@rucus.ru.ac.za (Ray Heasman)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Random Number Generation
  5. Date: 21 Feb 1996 15:49:24 GMT
  6. Organization: Rhodes University, Grahamstown
  7. Message-ID: <4gfeu4$7s9@quagga.ru.ac.za>
  8. References: <692.6619T1254T1752@in.net> <4ge7pc$1v2@news.internet.dk>
  9. NNTP-Posting-Host: rucus.ru.ac.za
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Kasper B. Graversen (kbg2001@internet.dk) wrote:
  13. : Hi John...
  14. : You wrote about <Random Number Generation>
  15.  
  16. :  JJM>         num=rand()%1000;        /*Try to modify rand()s output to be*/
  17. :  JJM>         num/=100;               /*between 0 and 1*/
  18.  
  19. :     Why not just num = rand()%2
  20.  
  21. : ??
  22.  
  23. Umm... you can do a nice Random number generator using 3 assembler
  24. instructions - an eor, a bcc and a shift.
  25.  
  26. If anyone is interested, mail me at ray@rucus.ru.ac.za
  27.  
  28. Cheerio,
  29. Ray
  30. --
  31.              _/_/_/   ""\ ""\    ""\ ""\ """""""\ ""\   _/_/_/_/_/_/_/_/_/_/_/
  32.            _/_/_/   """"\ """\  """\ ""\ ""\      """"\   _/ StarWriter  /  _/
  33.          _/_/_/   ""\ ""\ ""\"""\""\ ""\ ""\ """\ ""\ ""\   _/    Genisys   _/
  34. _/_/_/ _/_/_/   """"""""\ ""\ "\ ""\ ""\ ""\  ""\ """"""""\   _/            _/
  35.  _/_/_/_/_/   ""\     ""\ ""\    ""\ ""\ """""""\ ""\     ""\   _/_/_/_/_/_/_/
  36.    _/_/_/             Amiga - The canvas of the Gods.                
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.