Question about erand48 usage


 
Thread Tools Search this Thread
Top Forums Programming Question about erand48 usage
# 15  
Old 10-15-2010
It's the standard stuff. Ubuntu 8.04, Linux kernel version 2.6.24-28. gcc version 4.2.3
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Sed command usage question

How to work x in sed command? I know x command is swaps the contents of pattern space and hold space. But i am unable to understand it's working? (4 Replies)
Discussion started by: Vartika18
4 Replies

2. UNIX for Dummies Questions & Answers

Question on disk size and usage

Hello All, this may be a simple question but I wasn't sure how to word it to search for the answer. Have a look at the following: /dev/mapper/vgdata-lvdata 626G 594G 0 100% /data01 As you can see the disk size 626GB of which 594G is used. There's 32GB difference there but the... (5 Replies)
Discussion started by: bbbngowc
5 Replies

3. UNIX for Dummies Questions & Answers

Ln usage question

Is it possible to assign a symbolic link to a network folder, without that folder being mounted? Thanks! (1 Reply)
Discussion started by: nerdcurious
1 Replies

4. Shell Programming and Scripting

Question regarding sed usage

I have a html file with the following content:- <font face=verdana color=#000000>108946</font> <font face=verdana color=#000000>234346</font> I want to format the values inside the font tag using thousand separator. I have the following command which can be used for adding thousand... (4 Replies)
Discussion started by: Yoda
4 Replies

5. UNIX for Dummies Questions & Answers

rsync usage question

Hello folks; I'm using rsync on my Ubuntu servers to sync a remote folders on a remote machine to a local folders on a local machine. one thing i couldn't get to work is how to exclude folder. I know i'm suppose to use "exclude" argument but every time i do, i still see the excluded directory... (0 Replies)
Discussion started by: Katkota
0 Replies

6. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

7. Shell Programming and Scripting

usage of sed question for experts

I need a little help with sed. Basically, I need to parse out selections from the output of hddtemp so conky can display some hdd temps for me. I have hddtemp in daemon mode so A simple 'nc localhost 7634' displays the following: $ nc localhost 7634... (3 Replies)
Discussion started by: audiophile
3 Replies

8. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

9. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

10. AIX

basic question about disk usage

how to i find out the disk usage on a server. say in windows examples its like C:/ D:/ and checking out the disk space. how can i find in Unix. can i just use df -k (3 Replies)
Discussion started by: karthikosu
3 Replies
Login or Register to Ask a Question
DRAND48(3)						     Linux Programmer's Manual							DRAND48(3)

NAME
drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48, seed48, lcong48 - generate uniformly distributed pseudo-random numbers SYNOPSIS
#include <stdlib.h> double drand48(void); double erand48(unsigned short xsubi[3]); long int lrand48(void); long int nrand48(unsigned short xsubi[3]); long int mrand48(void); long int jrand48(unsigned short xsubi[3]); void srand48(long int seedval); unsigned short *seed48(unsigned short seed16v[3]); void lcong48(unsigned short param[7]); DESCRIPTION
These functions generate pseudo-random numbers using the linear congruential algorithm and 48-bit integer arithmetic. The drand48() and erand48() functions return non-negative double-precision floating-point values uniformly distributed between [0.0, 1.0). The lrand48() and nrand48() functions return non-negative long integers uniformly distributed between 0 and 2^31. The mrand48() and jrand48() functions return signed long integers uniformly distributed between -2^31 and 2^31. The srand48(), seed48() and lcong48() functions are initialization functions, one of which should be called before using drand48(), lrand48() or mrand48(). The functions erand48(), nrand48() and jrand48() do not require an initialization function to be called first. All the functions work by generating a sequence of 48-bit integers, Xi, according to the linear congruential formula: Xn+1 = (aXn + c) mod m, where n >= 0 The parameter m = 2^48, hence 48-bit integer arithmetic is performed. Unless lcong48() is called, a and c are given by: a = 0x5DEECE66D c = 0xB The value returned by any of the functions drand48(), erand48(), lrand48(), nrand48(), mrand48() or jrand48() is computed by first generat- ing the next 48-bit Xi in the sequence. Then the appropriate number of bits, according to the type of data item to be returned, is copied from the high-order bits of Xi and transformed into the returned value. The functions drand48(), lrand48() and mrand48() store the last 48-bit Xi generated in an internal buffer. The functions erand48(), nrand48() and jrand48() require the calling program to provide storage for the successive Xi values in the array argument xsubi. The func- tions are initialized by placing the initial value of Xi into the array before calling the function for the first time. The initializer function srand48() sets the high order 32-bits of Xi to the argument seedval. The low order 16-bits are set to the arbi- trary value 0x330E. The initializer function seed48() sets the value of Xi to the 48-bit value specified in the array argument seed16v. The previous value of Xi is copied into an internal buffer and a pointer to this buffer is returned by seed48(). The initialization function lcong48() allows the user to specify initial values for Xi, a and c. Array argument elements param[0-2] spec- ify Xi, param[3-5] specify a, and param[6] specifies c. After lcong48() has been called, a subsequent call to either srand48() or seed48() will restore the standard values of a and c. CONFORMING TO
SVID 3 NOTES
These functions are declared obsolete by SVID 3, which states that rand(3) should be used instead. SEE ALSO
rand(3), random(3) 1993-07-02 DRAND48(3)