| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | RANDOM NUMBER: SAME! |
Hi, I'm trying to generate floating point random numbers under EMX/GCC, using the random() function from the BSD libraries. I can generate a random number (1.2 digit), but it's always the same. If I run the program, for example, the number will be 0.98, and then I close the program, and try again a few seconds later, but I get the same number. I've changed srand(), but no luck. Here's how I generate a number: number = random()/9999999999.0; This may look absurd, but I don't know of any other way to do it! THANKS! --- Maximus/2 3.00* Origin: One Less Car * TorontOS/2 * (416) 480-0147 * (1:250/238) SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955 SEEN-BY: 712/407 515 517 628 713/888 800/1 @PATH: 250/238 2424/11 24 270/101 712/515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.