Double random value 
Author Message
 Double random value

How can I get a double random value in C ?
--
Aric Lambert



Sat, 24 Jul 1999 03:00:00 GMT  
 Double random value

Quote:

> How can I get a double random value in C ?

This depends on your compiler/operating system.

--
<\___/>
/ O O \
\_____/  FTB.

Black holes are where god divides by zero.



Sat, 24 Jul 1999 03:00:00 GMT  
 Double random value

Quote:

> How can I get a double random value in C ?

I am not exactly sure what you mean, so I am going to guess.

        double rndm_value;
        srand( time() );
        rndm_value = (double)rand(); /* I am assuming you want a double */

--
********************************************

********************************************
*   There was a little girl,
*   Who had a little curl,
*   Right in the middle of her forehead.
*   When she was good...
*   she was very, very good,
*   but when she was bad...
*   she was Better!!!!
********************************************



Sat, 24 Jul 1999 03:00:00 GMT  
 Double random value


Quote:

> How can I get a double random value in C ?
> --
> Aric Lambert


Look in the FAQ List, questions 13.15 through 13.20.  The FAQ is available
via anonymous FTP from rtfm.mit.edu under
/pub/usenet/comp.lang.c/C-FAQ-List.

--
John F. Bode
My opinions are not necessarily the opinions of my employer



Sat, 24 Jul 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. addition long values to long double value ?

2. double random number generation

3. Double random numbers

4. How to get REAL random values

5. Easy question- How to get a random number between to values

6. Help for generateing random values!

7. Random values between 0.0 and 0.9999

8. Random values ...

9. How can I get random value in c#?

10. Sorting on double values.

11. question about huge double value

12. Largest double value ...

 

 
Powered by phpBB® Forum Software