|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: r
Length: 2200 (0x898)
Names: »rand.3c«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./usr/man/cat3/rand.3c«
0x000…020 0a 0a 0a 5f 08 4f 5f 08 6e 5f 08 6c 5f 08 69 5f 08 6e 5f 08 65 20 5f 08 4d 5f 08 61 5f 08 6e 5f ┆ _ O_ n_ l_ i_ n_ e _ M_ a_ n_┆
0x020…040 08 75 5f 08 61 5f 08 6c 20 20 20 20 20 20 20 20 20 20 20 4c 69 62 72 61 72 79 20 46 75 6e 63 74 ┆ u_ a_ l Library Funct┆
0x040…060 69 6f 6e 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 61 6e 64 28 33 63 29 0a 0a 0a 0a ┆ions rand(3c) ┆
0x060…080 4e 08 4e 08 4e 08 4e 41 08 41 08 41 08 41 4d 08 4d 08 4d 08 4d 45 08 45 08 45 08 45 0a 20 20 20 ┆N N N NA A A AM M M ME E E E ┆
0x080…0a0 20 20 72 61 6e 64 2c 20 73 72 61 6e 64 20 2d 20 70 73 65 75 64 6f 2d 72 61 6e 64 6f 6d 20 6e 75 ┆ rand, srand - pseudo-random nu┆
0x0a0…0c0 6d 62 65 72 20 67 65 6e 65 72 61 74 6f 72 0a 0a 53 08 53 08 53 08 53 59 08 59 08 59 08 59 4e 08 ┆mber generator S S S SY Y Y YN ┆
0x0c0…0e0 4e 08 4e 08 4e 54 08 54 08 54 08 54 41 08 41 08 41 08 41 58 08 58 08 58 08 58 0a 20 20 20 20 20 ┆N N NT T T TA A A AX X X X ┆
0x0e0…100 23 08 23 08 23 08 23 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 63 08 63 08 63 08 63 6c 08 6c 08 ┆# # # #i i i in n n nc c c cl l ┆
0x100…120 6c 08 6c 75 08 75 08 75 08 75 64 08 64 08 64 08 64 65 08 65 08 65 08 65 20 3c 08 3c 08 3c 08 3c ┆l lu u u ud d d de e e e < < < <┆
0x120…140 73 08 73 08 73 08 73 74 08 74 08 74 08 74 64 08 64 08 64 08 64 6c 08 6c 08 6c 08 6c 69 08 69 08 ┆s s s st t t td d d dl l l li i ┆
0x140…160 69 08 69 62 08 62 08 62 08 62 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e 08 3e 08 3e 08 3e 0a ┆i ib b b b. . . .h h h h> > > > ┆
0x160…180 0a 20 20 20 20 20 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 20 72 08 72 08 ┆ i i i in n n nt t t t r r ┆
0x180…1a0 72 08 72 61 08 61 08 61 08 61 6e 08 6e 08 6e 08 6e 64 08 64 08 64 08 64 28 08 28 08 28 08 28 29 ┆r ra a a an n n nd d d d( ( ( ()┆
0x1a0…1c0 08 29 08 29 08 29 0a 0a 20 20 20 20 20 76 08 76 08 76 08 76 6f 08 6f 08 6f 08 6f 69 08 69 08 69 ┆ ) ) ) v v v vo o o oi i i┆
0x1c0…1e0 08 69 64 08 64 08 64 08 64 20 73 08 73 08 73 08 73 72 08 72 08 72 08 72 61 08 61 08 61 08 61 6e ┆ id d d d s s s sr r r ra a a an┆
0x1e0…200 08 6e 08 6e 08 6e 64 08 64 08 64 08 64 28 08 28 08 28 08 28 73 08 73 08 73 08 73 65 08 65 08 65 ┆ n n nd d d d( ( ( (s s s se e e┆
0x200…220 08 65 65 08 65 08 65 08 65 64 08 64 08 64 08 64 29 08 29 08 29 08 29 0a 20 20 20 20 20 75 08 75 ┆ ee e e ed d d d) ) ) ) u u┆
0x220…240 08 75 08 75 6e 08 6e 08 6e 08 6e 73 08 73 08 73 08 73 69 08 69 08 69 08 69 67 08 67 08 67 08 67 ┆ u un n n ns s s si i i ig g g g┆
0x240…260 6e 08 6e 08 6e 08 6e 65 08 65 08 65 08 65 64 08 64 08 64 08 64 20 73 08 73 08 73 08 73 65 08 65 ┆n n n ne e e ed d d d s s s se e┆
0x260…280 08 65 08 65 65 08 65 08 65 08 65 64 08 64 08 64 08 64 3b 08 3b 08 3b 08 3b 0a 0a 44 08 44 08 44 ┆ e ee e e ed d d d; ; ; ; D D D┆
0x280…2a0 08 44 45 08 45 08 45 08 45 53 08 53 08 53 08 53 43 08 43 08 43 08 43 52 08 52 08 52 08 52 49 08 ┆ DE E E ES S S SC C C CR R R RI ┆
0x2a0…2c0 49 08 49 08 49 50 08 50 08 50 08 50 54 08 54 08 54 08 54 49 08 49 08 49 08 49 4f 08 4f 08 4f 08 ┆I I IP P P PT T T TI I I IO O O ┆
0x2c0…2e0 4f 4e 08 4e 08 4e 08 4e 0a 20 20 20 20 20 5f 08 72 5f 08 61 5f 08 6e 5f 08 64 20 75 73 65 73 20 ┆ON N N N _ r_ a_ n_ d uses ┆
0x2e0…300 61 20 6d 75 6c 74 69 70 6c 69 63 61 74 69 76 65 20 63 6f 6e 67 72 75 65 6e 74 69 61 6c 20 72 61 ┆a multiplicative congruential ra┆
0x300…320 6e 64 6f 6d 2d 6e 75 6d 62 65 72 20 67 65 6e 2d 0a 20 20 20 20 20 65 72 61 74 6f 72 20 77 69 74 ┆ndom-number gen- erator wit┆
0x320…340 68 20 70 65 72 69 6f 64 20 32 5e 33 32 20 74 68 61 74 20 72 65 74 75 72 6e 73 20 73 75 63 63 65 ┆h period 2^32 that returns succe┆
0x340…360 73 73 69 76 65 20 70 73 65 75 64 6f 2d 0a 20 20 20 20 20 72 61 6e 64 6f 6d 20 6e 75 6d 62 65 72 ┆ssive pseudo- random number┆
0x360…380 73 20 69 6e 20 74 68 65 20 72 61 6e 67 65 20 66 72 6f 6d 20 30 20 74 6f 20 7b 52 41 4e 44 5f 4d ┆s in the range from 0 to {RAND_M┆
0x380…3a0 41 58 7d 20 28 64 65 66 69 6e 65 64 20 69 6e 0a 20 20 20 20 20 3c 08 3c 08 3c 08 3c 73 08 73 08 ┆AX} (defined in < < < <s s ┆
0x3a0…3c0 73 08 73 74 08 74 08 74 08 74 64 08 64 08 64 08 64 6c 08 6c 08 6c 08 6c 69 08 69 08 69 08 69 62 ┆s st t t td d d dl l l li i i ib┆
0x3c0…3e0 08 62 08 62 08 62 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e 08 3e 08 3e 08 3e 29 2e 0a 0a 20 ┆ b b b. . . .h h h h> > > >). ┆
0x3e0…400 20 20 20 20 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 5f 08 73 5f 08 72 5f 08 61 5f 08 6e 5f 08 64 ┆ The function _ s_ r_ a_ n_ d┆
0x400…420 20 75 73 65 73 20 74 68 65 20 61 72 67 75 6d 65 6e 74 20 5f 08 73 5f 08 65 5f 08 65 5f 08 64 20 ┆ uses the argument _ s_ e_ e_ d ┆
0x420…440 61 73 20 61 20 73 65 65 64 20 66 6f 72 20 61 0a 20 20 20 20 20 6e 65 77 20 73 65 71 75 65 6e 63 ┆as a seed for a new sequenc┆
0x440…460 65 20 6f 66 20 70 73 65 75 64 6f 2d 72 61 6e 64 6f 6d 20 6e 75 6d 62 65 72 73 20 74 6f 20 62 65 ┆e of pseudo-random numbers to be┆
0x460…480 20 72 65 74 75 72 6e 65 64 20 62 79 20 73 75 62 2d 0a 20 20 20 20 20 73 65 71 75 65 6e 74 20 63 ┆ returned by sub- sequent c┆
0x480…4a0 61 6c 6c 73 20 74 6f 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 5f 08 72 5f 08 61 5f 08 6e 5f 08 ┆alls to the function _ r_ a_ n_ ┆
0x4a0…4c0 64 2e 20 20 49 66 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 5f 08 73 5f 08 72 5f 08 61 5f 08 6e ┆d. If the function _ s_ r_ a_ n┆
0x4c0…4e0 5f 08 64 0a 20 20 20 20 20 69 73 20 74 68 65 6e 20 63 61 6c 6c 65 64 20 77 69 74 68 20 74 68 65 ┆_ d is then called with the┆
0x4e0…500 20 73 61 6d 65 20 5f 08 73 5f 08 65 5f 08 65 5f 08 64 20 76 61 6c 75 65 2c 20 74 68 65 20 73 65 ┆ same _ s_ e_ e_ d value, the se┆
0x500…520 71 75 65 6e 63 65 20 6f 66 0a 20 20 20 20 20 70 73 65 75 64 6f 2d 72 61 6e 64 6f 6d 20 6e 75 6d ┆quence of pseudo-random num┆
0x520…540 62 65 72 73 20 77 69 6c 6c 20 62 65 20 72 65 70 65 61 74 65 64 2e 20 20 49 66 20 74 68 65 20 66 ┆bers will be repeated. If the f┆
0x540…560 75 6e 63 74 69 6f 6e 0a 20 20 20 20 20 5f 08 72 5f 08 61 5f 08 6e 5f 08 64 20 69 73 20 63 61 6c ┆unction _ r_ a_ n_ d is cal┆
0x560…580 6c 65 64 20 62 65 66 6f 72 65 20 61 6e 79 20 63 61 6c 6c 73 20 74 6f 20 5f 08 73 5f 08 72 5f 08 ┆led before any calls to _ s_ r_ ┆
0x580…5a0 61 5f 08 6e 5f 08 64 20 68 61 76 65 20 62 65 65 6e 20 6d 61 64 65 2c 20 74 68 65 0a 20 20 20 20 ┆a_ n_ d have been made, the ┆
0x5a0…5c0 20 73 61 6d 65 20 73 65 71 75 65 6e 63 65 20 77 69 6c 6c 20 62 65 20 67 65 6e 65 72 61 74 65 64 ┆ same sequence will be generated┆
0x5c0…5e0 20 61 73 20 77 68 65 6e 20 5f 08 73 5f 08 72 5f 08 61 5f 08 6e 5f 08 64 20 69 73 20 66 69 72 73 ┆ as when _ s_ r_ a_ n_ d is firs┆
0x5e0…600 74 0a 20 20 20 20 20 63 61 6c 6c 65 64 20 77 69 74 68 20 61 20 5f 08 73 5f 08 65 5f 08 65 5f 08 ┆t called with a _ s_ e_ e_ ┆
0x600…620 64 20 76 61 6c 75 65 20 6f 66 20 31 2e 0a 0a 52 08 52 08 52 08 52 45 08 45 08 45 08 45 54 08 54 ┆d value of 1. R R R RE E E ET T┆
0x620…640 08 54 08 54 55 08 55 08 55 08 55 52 08 52 08 52 08 52 4e 08 4e 08 4e 08 4e 20 56 08 56 08 56 08 ┆ T TU U U UR R R RN N N N V V V ┆
0x640…660 56 41 08 41 08 41 08 41 4c 08 4c 08 4c 08 4c 55 08 55 08 55 08 55 45 08 45 08 45 08 45 0a 20 20 ┆VA A A AL L L LU U U UE E E E ┆
0x660…680 20 20 20 5f 08 72 5f 08 61 5f 08 6e 5f 08 64 20 72 65 74 75 72 6e 73 20 74 68 65 20 6e 65 78 74 ┆ _ r_ a_ n_ d returns the next┆
0x680…6a0 20 70 73 65 75 64 6f 2d 72 61 6e 64 6f 6d 20 6e 75 6d 62 65 72 20 69 6e 20 74 68 65 20 73 65 71 ┆ pseudo-random number in the seq┆
0x6a0…6c0 75 65 6e 63 65 3b 0a 20 20 20 20 20 5f 08 73 5f 08 72 5f 08 61 5f 08 6e 5f 08 64 20 64 6f 65 73 ┆uence; _ s_ r_ a_ n_ d does┆
0x6c0…6e0 20 6e 6f 74 20 68 61 76 65 20 61 20 72 65 74 75 72 6e 20 76 61 6c 75 65 2e 0a 0a 45 08 45 08 45 ┆ not have a return value. E E E┆
0x6e0…700 08 45 52 08 52 08 52 08 52 52 08 52 08 52 08 52 4f 08 4f 08 4f 08 4f 52 08 52 08 52 08 52 53 08 ┆ ER R R RR R R RO O O OR R R RS ┆
0x700…720 53 08 53 08 53 0a 20 20 20 20 20 4e 6f 20 65 72 72 6f 72 73 20 61 72 65 20 64 65 66 69 6e 65 64 ┆S S S No errors are defined┆
0x720…740 2e 0a 0a 4e 08 4e 08 4e 08 4e 4f 08 4f 08 4f 08 4f 54 08 54 08 54 08 54 45 08 45 08 45 08 45 53 ┆. N N N NO O O OT T T TE E E ES┆
0x740…760 08 53 08 53 08 53 0a 20 20 20 20 20 54 68 65 20 73 70 65 63 74 72 61 6c 20 70 72 6f 70 65 72 74 ┆ S S S The spectral propert┆
0x760…780 69 65 73 20 6f 66 20 5f 08 72 5f 08 61 5f 08 6e 5f 08 64 20 61 72 65 20 6c 69 6d 69 74 65 64 2e ┆ies of _ r_ a_ n_ d are limited.┆
0x780…7a0 20 20 5f 08 64 5f 08 72 5f 08 61 5f 08 6e 5f 08 64 5f 08 34 5f 08 38 20 70 72 6f 2d 0a 20 20 20 ┆ _ d_ r_ a_ n_ d_ 4_ 8 pro- ┆
0x7a0…7c0 20 20 76 69 64 65 73 20 61 20 6d 75 63 68 20 62 65 74 74 65 72 2c 20 74 68 6f 75 67 68 20 6d 6f ┆ vides a much better, though mo┆
0x7c0…7e0 72 65 20 65 6c 61 62 6f 72 61 74 65 2c 20 72 61 6e 64 6f 6d 2d 6e 75 6d 62 65 72 0a 20 20 20 20 ┆re elaborate, random-number ┆
0x7e0…800 20 67 65 6e 65 72 61 74 6f 72 2e 0a 0a 53 08 53 08 53 08 53 45 08 45 08 45 08 45 45 08 45 08 45 ┆ generator. S S S SE E E EE E E┆
0x800…820 08 45 20 41 08 41 08 41 08 41 4c 08 4c 08 4c 08 4c 53 08 53 08 53 08 53 4f 08 4f 08 4f 08 4f 0a ┆ E A A A AL L L LS S S SO O O O ┆
0x820…840 20 20 20 20 20 4c 69 62 72 61 72 79 20 46 75 6e 63 74 69 6f 6e 73 20 28 33 29 3a 20 64 72 61 6e ┆ Library Functions (3): dran┆
0x840…860 64 34 38 0a 0a 44 65 63 65 6d 62 65 72 20 31 39 39 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆d48 December 1990 ┆
0x860…880 20 20 20 20 20 20 20 20 20 20 20 20 20 54 58 20 50 72 6f 67 72 61 6d 6d 65 72 27 73 20 52 65 66 ┆ TX Programmer's Ref┆
0x880…898 65 72 65 6e 63 65 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a ┆erence ┆