Debian Codegraph @

po/ru/man3/rand.3.po

raw
1 # Russian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # aereiae <[email protected]>, 2014.
5 # Azamat Hackimov <[email protected]>, 2013-2014, 2016.
6 # Dmitriy S. Seregin <[email protected]>, 2013.
7 # Katrin Kutepova <[email protected]>, 2018.
8 # Lockal <[email protected]>, 2013.
9 # Yuri Kozlov <[email protected]>, 2011-2019.
10 # Баринов Владимир, 2016.
11 # Иван Павлов <[email protected]>, 2017,2019.
12 msgid ""
13 msgstr ""
14 "Project-Id-Version: manpages-l10n\n"
15 "POT-Creation-Date: 2026-06-05 06:39+0200\n"
16 "PO-Revision-Date: 2024-12-21 19:50+0300\n"
17 "Last-Translator: Yuri Kozlov <[email protected]>\n"
18 "Language-Team: Russian <[email protected]>\n"
19 "Language: ru\n"
20 "MIME-Version: 1.0\n"
21 "Content-Type: text/plain; charset=UTF-8\n"
22 "Content-Transfer-Encoding: 8bit\n"
23 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
24 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
25 "(n%100>=11 && n%100<=14)? 2 : 3);\n"
26 "X-Generator: Lokalize 2.0\n"
27
28 #. type: TH
29 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
30 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
31 #, no-wrap
32 msgid "rand"
33 msgstr ""
34
35 #. type: TH
36 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
37 #: opensuse-tumbleweed
38 #, no-wrap
39 msgid "2026-02-08"
40 msgstr "8 февраля 2026 г."
41
42 #. type: TH
43 #: archlinux debian-unstable
44 #, fuzzy, no-wrap
45 #| msgid "Linux man-pages 6.17"
46 msgid "Linux man-pages 6.18"
47 msgstr "Справочные страницы Linux 6.17"
48
49 #. type: SH
50 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
51 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
52 #, no-wrap
53 msgid "NAME"
54 msgstr "НАИМЕНОВАНИЕ"
55
56 #. type: Plain text
57 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
58 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
59 msgid "rand, rand_r, srand - pseudo-random number generator"
60 msgstr "rand, rand_r, srand - генератор псевдослучайных чисел"
61
62 #. type: SH
63 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
64 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
65 #, no-wrap
66 msgid "LIBRARY"
67 msgstr "БИБЛИОТЕКА"
68
69 #. type: Plain text
70 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
71 #: opensuse-leap-16-1 opensuse-tumbleweed
72 msgid "Standard C library (I<libc>,\\ I<-lc>)"
73 msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)"
74
75 #. type: SH
76 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
77 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
78 #, no-wrap
79 msgid "SYNOPSIS"
80 msgstr "СИНТАКСИС"
81
82 #. type: Plain text
83 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
84 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
85 #, no-wrap
86 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
87 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
88
89 #. type: Plain text
90 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
91 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
92 #, fuzzy, no-wrap
93 #| msgid "B<void srand(unsigned int >I<seed>B<);>\n"
94 msgid ""
95 "B<int rand(void);>\n"
96 "B<void srand(unsigned int >I<seed>B<);>\n"
97 msgstr "B<void srand(unsigned int >I<seed>B<);>\n"
98
99 #. type: Plain text
100 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
101 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
102 #, fuzzy, no-wrap
103 #| msgid "B<int rand_r(unsigned int *>I<seedp>B<);>\n"
104 msgid "B<[[deprecated]] int rand_r(unsigned int *>I<seedp>B<);>\n"
105 msgstr "B<int rand_r(unsigned int *>I<seedp>B<);>\n"
106
107 #. type: Plain text
108 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
109 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
110 msgid ""
111 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
112 msgstr ""
113 "Требования макроса тестирования свойств для glibc (см. "
114 "B<feature_test_macros>(7)):"
115
116 #. type: Plain text
117 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
118 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
119 msgid "B<rand_r>():"
120 msgstr "B<rand_r>():"
121
122 #. type: Plain text
123 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
124 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
125 #, fuzzy, no-wrap
126 #| msgid ""
127 #| "B<rpmatch>():\n"
128 #| " Since glibc 2.19:\n"
129 #| " _DEFAULT_SOURCE\n"
130 #| " Glibc 2.19 and earlier:\n"
131 #| " _SVID_SOURCE\n"
132 msgid ""
133 " Since glibc 2.24:\n"
134 " _POSIX_C_SOURCE E<gt>= 199506L\n"
135 " glibc 2.23 and earlier\n"
136 " _POSIX_C_SOURCE\n"
137 msgstr ""
138 "B<rpmatch>():\n"
139 " начиная с glibc 2.19:\n"
140 " _DEFAULT_SOURCE\n"
141 " в glibc 2.19 и старее:\n"
142 " _SVID_SOURCE\n"
143
144 #. type: SH
145 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
146 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
147 #, no-wrap
148 msgid "DESCRIPTION"
149 msgstr "ОПИСАНИЕ"
150
151 #. type: Plain text
152 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
153 #: opensuse-tumbleweed
154 #, fuzzy
155 #| msgid ""
156 #| "The B<rand>() function returns a pseudo-random integer in the range 0 to "
157 #| "B<RAND_MAX> inclusive (i.e., the mathematical range [0,\\ B<RAND_MAX>])."
158 msgid ""
159 "The B<rand>() function returns a pseudo-random integer in the range 0 to "
160 "B<RAND_MAX> inclusive (i.e., the mathematical range [B<0>,\\ B<RAND_MAX>])."
161 msgstr ""
162 "Функция B<rand>() возвращает псевдослучайное целое число в диапазоне от нуля "
163 "до B<RAND_MAX> включительно (т. е., из математического диапазона [0,\\ "
164 "B<RAND_MAX>])."
165
166 #. type: Plain text
167 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
168 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
169 msgid ""
170 "The B<srand>() function sets its argument as the seed for a new sequence of "
171 "pseudo-random integers to be returned by B<rand>(). These sequences are "
172 "repeatable by calling B<srand>() with the same seed value."
173 msgstr ""
174 "Функция B<srand>() устанавливает свой аргумент как основу (seed) для новой "
175 "последовательности псевдослучайных целых чисел, возвращаемых функцией "
176 "B<rand>(). Эту последовательность можно воспроизвести. Для этого необходимо "
177 "вызвать B<srand>() с той же величиной основы."
178
179 #. type: Plain text
180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
182 msgid ""
183 "If no seed value is provided, the B<rand>() function is automatically "
184 "seeded with a value of 1."
185 msgstr ""
186 "Если основа не задана, то функция B<rand>() автоматически устанавливает её "
187 "равной 1."
188
189 #. type: Plain text
190 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
191 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
192 msgid ""
193 "The function B<rand>() is not reentrant, since it uses hidden state that is "
194 "modified on each call. This might just be the seed value to be used by the "
195 "next call, or it might be something more elaborate. In order to get "
196 "reproducible behavior in a threaded application, this state must be made "
197 "explicit; this can be done using the reentrant function B<rand_r>()."
198 msgstr ""
199 "Функция B<rand>() не реентерабельная, так как она использует скрытое "
200 "состояние, которое изменяется с каждым вызовом. Это может быть как просто "
201 "значение основы, так и что-то более сложное. Чтобы получить воспроизводимое "
202 "поведение в многонитевом приложении такое состояние нужно создать явным "
203 "образом; это можно сделать с помощью реентерабельной функции B<rand_r>()."
204
205 #. type: Plain text
206 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
207 #: opensuse-tumbleweed
208 #, fuzzy
209 #| msgid ""
210 #| "Like B<rand>(), B<rand_r>() returns a pseudo-random integer in the range "
211 #| "[0,\\ B<RAND_MAX>]. The I<seedp> argument is a pointer to an I<unsigned "
212 #| "int> that is used to store state between calls. If B<rand_r>() is "
213 #| "called with the same initial value for the integer pointed to by "
214 #| "I<seedp>, and that value is not modified between calls, then the same "
215 #| "pseudo-random sequence will result."
216 msgid ""
217 "Like B<rand>(), B<rand_r>() returns a pseudo-random integer in the range "
218 "[B<0>,\\ B<RAND_MAX>]. The I<seedp> argument is a pointer to an I<unsigned "
219 "int> that is used to store state between calls. If B<rand_r>() is called "
220 "with the same initial value for the integer pointed to by I<seedp>, and that "
221 "value is not modified between calls, then the same pseudo-random sequence "
222 "will result."
223 msgstr ""
224 "Как и B<rand>(), B<rand_r>() возвращает псевдослучайное целое число из "
225 "диапазона [0,\\ B<RAND_MAX>]. Аргумент I<seedp> является указателем на число "
226 "I<unsigned int>, которое используется для хранения состояния между вызовами. "
227 "Если B<rand_r>() вызывается с одинаковым начальным значением целого, на "
228 "которое указывает I<seedp>, и это значение не изменяется между вызовами, то "
229 "результатом будет одинаковая псевдослучайная последовательность."
230
231 #. type: Plain text
232 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
233 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
234 msgid ""
235 "The value pointed to by the I<seedp> argument of B<rand_r>() provides only "
236 "a very small amount of state, so this function will be a weak pseudo-random "
237 "generator. Try B<drand48_r>(3) instead."
238 msgstr ""
239 "Значение, на которое указывает аргумент I<seedp> для B<rand_r>(), "
240 "предоставляет только очень малую часть состояния, поэтому данная функция "
241 "будет очень не случайным псевдослучайным генератором. Используйте вместо неё "
242 "B<drand48_r>(3)."
243
244 #. type: SH
245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
247 #, no-wrap
248 msgid "RETURN VALUE"
249 msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ"
250
251 #. type: Plain text
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 msgid ""
255 "The B<rand>() and B<rand_r>() functions return a value between 0 and "
256 "B<RAND_MAX> (inclusive). The B<srand>() function returns no value."
257 msgstr ""
258 "Функции B<rand>() и B<rand_r>() возвращают значение в промежутке от 0 до "
259 "B<RAND_MAX> (включительно). Функция B<srand>() не возвращает результат."
260
261 #. type: SH
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "ATTRIBUTES"
266 msgstr "АТРИБУТЫ"
267
268 #. type: Plain text
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 msgid ""
272 "For an explanation of the terms used in this section, see B<attributes>(7)."
273 msgstr "Описание терминов данного раздела смотрите в B<attributes>(7)."
274
275 #. type: tbl table
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 #, no-wrap
279 msgid "Interface"
280 msgstr "Интерфейс"
281
282 #. type: tbl table
283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
285 #, no-wrap
286 msgid "Attribute"
287 msgstr "Атрибут"
288
289 #. type: tbl table
290 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
291 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
292 #, no-wrap
293 msgid "Value"
294 msgstr "Значение"
295
296 #. type: tbl table
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 #, no-wrap
300 msgid ".na\n"
301 msgstr ".na\n"
302
303 #. type: tbl table
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 #, no-wrap
307 msgid ".nh\n"
308 msgstr ".nh\n"
309
310 #. type: tbl table
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 #, no-wrap
314 msgid ""
315 "B<rand>(),\n"
316 "B<rand_r>(),\n"
317 "B<srand>()"
318 msgstr ""
319 "B<rand>(),\n"
320 "B<rand_r>(),\n"
321 "B<srand>()"
322
323 #. type: tbl table
324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
326 #, no-wrap
327 msgid "Thread safety"
328 msgstr "Безвредность в нитях"
329
330 #. type: tbl table
331 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
332 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
333 #, no-wrap
334 msgid "MT-Safe"
335 msgstr "MT-Safe"
336
337 #. type: SH
338 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
339 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
340 #, no-wrap
341 msgid "VERSIONS"
342 msgstr "ВЕРСИИ"
343
344 #. type: Plain text
345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
347 msgid ""
348 "The versions of B<rand>() and B<srand>() in the Linux C Library use the "
349 "same random number generator as B<random>(3) and B<srandom>(3), so the "
350 "lower-order bits should be as random as the higher-order bits. However, on "
351 "older B<rand>() implementations, and on current implementations on "
352 "different systems, the lower-order bits are much less random than the higher-"
353 "order bits. Do not use this function in applications intended to be "
354 "portable when good randomness is needed. (Use B<random>(3) instead.)"
355 msgstr ""
356 "Версия функций B<rand>() и B<srand>() в библиотеке Си для Linux использует "
357 "тот же генератор чисел, что и в функциях B<random>(3) и B<srandom>(3), так "
358 "что младшие биты в числе случайны настолько, насколько и старшие. В то же "
359 "время, в старых реализациях B<rand>() и в текущих реализациях на других "
360 "системах младшие биты являются гораздо менее случайными, чем старшие. Не "
361 "используйте эту функцию в переносимых приложениях, для которых требуется "
362 "большая случайность (вместо неё используйте B<random>(3))."
363
364 #. type: SH
365 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
366 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
367 #, no-wrap
368 msgid "STANDARDS"
369 msgstr "СТАНДАРТЫ"
370
371 #. type: TP
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 #, fuzzy, no-wrap
375 #| msgid "B<rand_r>():"
376 msgid "B<rand>()"
377 msgstr "B<rand_r>():"
378
379 #. type: TQ
380 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
381 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
382 #, fuzzy, no-wrap
383 #| msgid "B<rand_r>():"
384 msgid "B<srand>()"
385 msgstr "B<rand_r>():"
386
387 #. type: Plain text
388 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
389 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
390 msgid "C11, POSIX.1-2008."
391 msgstr "C11, POSIX.1-2008."
392
393 #. type: TP
394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
396 #, fuzzy, no-wrap
397 #| msgid "B<rand_r>():"
398 msgid "B<rand_r>()"
399 msgstr "B<rand_r>():"
400
401 #. type: Plain text
402 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
403 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
404 msgid "POSIX.1-2008."
405 msgstr "POSIX.1-2008."
406
407 #. type: SH
408 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
409 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
410 #, no-wrap
411 msgid "HISTORY"
412 msgstr "ИСТОРИЯ"
413
414 #. type: Plain text
415 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
416 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
417 msgid "SVr4, 4.3BSD, C89, POSIX.1-2001."
418 msgstr "SVr4, 4.3BSD, C89, POSIX.1-2001."
419
420 #. type: Plain text
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 #, fuzzy
424 #| msgid "POSIX.1-2001, POSIX.1-2008."
425 msgid "POSIX.1-2001. Obsolete in POSIX.1-2008."
426 msgstr "POSIX.1-2001, POSIX.1-2008."
427
428 #. type: SH
429 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
430 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
431 #, no-wrap
432 msgid "EXAMPLES"
433 msgstr "ПРИМЕРЫ"
434
435 #. type: Plain text
436 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
437 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
438 msgid ""
439 "POSIX.1-2001 gives the following example of an implementation of B<rand>() "
440 "and B<srand>(), possibly useful when one needs the same sequence on two "
441 "different machines."
442 msgstr ""
443 "В POSIX.1-2001 приведён следующий пример реализации B<rand>() и B<srand>(), "
444 "возможно полезный, если требуется одинаковая последовательность на двух "
445 "разных машинах."
446
447 #. type: Plain text
448 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
449 #: opensuse-leap-16-1 opensuse-tumbleweed
450 #, fuzzy, no-wrap
451 #| msgid ""
452 #| "/* RAND_MAX assumed to be 32767 */\n"
453 #| "int myrand(void) {\n"
454 #| " next = next * 1103515245 + 12345;\n"
455 #| " return((unsigned)(next/65536) % 32768);\n"
456 #| "}\n"
457 msgid ""
458 "static unsigned long next = 1;\n"
459 "\\&\n"
460 "/* RAND_MAX assumed to be 32767 */\n"
461 "int myrand(void) {\n"
462 " next = next * 1103515245 + 12345;\n"
463 " return((unsigned) (next/65536) % 32768);\n"
464 "}\n"
465 "\\&\n"
466 "void mysrand(unsigned int seed) {\n"
467 " next = seed;\n"
468 "}\n"
469 msgstr ""
470 "/* предполагается, что RAND_MAX равно 32767 */\n"
471 "int myrand(void) {\n"
472 " next = next * 1103515245 + 12345;\n"
473 " return((unsigned)(next/65536) % 32768);\n"
474 "}\n"
475
476 #. type: Plain text
477 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
478 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
479 #, fuzzy
480 #| msgid ""
481 #| "The following program can be used to display the pseudo-random sequence "
482 #| "produced by B<rand>() when given a particular seed."
483 msgid ""
484 "The following program can be used to display the pseudo-random sequence "
485 "produced by B<rand>() when given a particular seed. When the seed is "
486 "I<-1>, the program uses a random seed."
487 msgstr ""
488 "Следующая программа может использоваться для отображения псевдослучайной "
489 "последовательности, созданной B<rand>() при указании определённой основы."
490
491 #. type: Plain text
492 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
493 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
494 #, no-wrap
495 msgid ""
496 "#include E<lt>stdio.hE<gt>\n"
497 "#include E<lt>stdlib.hE<gt>\n"
498 "\\&\n"
499 "int\n"
500 "main(int argc, char *argv[])\n"
501 "{\n"
502 " int r;\n"
503 " unsigned int seed, nloops;\n"
504 "\\&\n"
505 " if (argc != 3) {\n"
506 " fprintf(stderr, \"Usage: %s E<lt>seedE<gt> E<lt>nloopsE<gt>\\[rs]n\", argv[0]);\n"
507 " exit(EXIT_FAILURE);\n"
508 " }\n"
509 "\\&\n"
510 " seed = atoi(argv[1]);\n"
511 " nloops = atoi(argv[2]);\n"
512 "\\&\n"
513 " if (seed == -1) {\n"
514 " seed = arc4random();\n"
515 " printf(\"seed: %u\\[rs]n\", seed);\n"
516 " }\n"
517 "\\&\n"
518 " srand(seed);\n"
519 " for (unsigned int j = 0; j E<lt> nloops; j++) {\n"
520 " r = rand();\n"
521 " printf(\"%d\\[rs]n\", r);\n"
522 " }\n"
523 "\\&\n"
524 " exit(EXIT_SUCCESS);\n"
525 "}\n"
526 msgstr ""
527
528 #. type: SH
529 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
530 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
531 #, no-wrap
532 msgid "SEE ALSO"
533 msgstr "СМОТРИТЕ ТАКЖЕ"
534
535 #. type: Plain text
536 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
537 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
538 msgid "B<drand48>(3), B<random>(3)"
539 msgstr "B<drand48>(3), B<random>(3)"
540
541 #. type: TH
542 #: debian-trixie
543 #, no-wrap
544 msgid "2024-06-15"
545 msgstr "15 июня 2024 г."
546
547 #. type: TH
548 #: debian-trixie
549 #, no-wrap
550 msgid "Linux man-pages 6.9.1"
551 msgstr "Страницы руководства Linux 6.9.1"
552
553 #. type: Plain text
554 #: debian-trixie
555 msgid "Standard C library (I<libc>, I<-lc>)"
556 msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)"
557
558 #. type: Plain text
559 #: debian-trixie fedora-44 fedora-rawhide
560 msgid ""
561 "The B<rand>() function returns a pseudo-random integer in the range 0 to "
562 "B<RAND_MAX> inclusive (i.e., the mathematical range [0,\\ B<RAND_MAX>])."
563 msgstr ""
564 "Функция B<rand>() возвращает псевдослучайное целое число в диапазоне от нуля "
565 "до B<RAND_MAX> включительно (т. е., из математического диапазона [0,\\ "
566 "B<RAND_MAX>])."
567
568 #. type: Plain text
569 #: debian-trixie fedora-44 fedora-rawhide
570 msgid ""
571 "Like B<rand>(), B<rand_r>() returns a pseudo-random integer in the range "
572 "[0,\\ B<RAND_MAX>]. The I<seedp> argument is a pointer to an I<unsigned "
573 "int> that is used to store state between calls. If B<rand_r>() is called "
574 "with the same initial value for the integer pointed to by I<seedp>, and that "
575 "value is not modified between calls, then the same pseudo-random sequence "
576 "will result."
577 msgstr ""
578 "Как и B<rand>(), B<rand_r>() возвращает псевдослучайное целое число из "
579 "диапазона [0,\\ B<RAND_MAX>]. Аргумент I<seedp> является указателем на число "
580 "I<unsigned int>, которое используется для хранения состояния между вызовами. "
581 "Если B<rand_r>() вызывается с одинаковым начальным значением целого, на "
582 "которое указывает I<seedp>, и это значение не изменяется между вызовами, то "
583 "результатом будет одинаковая псевдослучайная последовательность."
584
585 #. type: Plain text
586 #: debian-trixie
587 #, fuzzy, no-wrap
588 #| msgid ""
589 #| "/* RAND_MAX assumed to be 32767 */\n"
590 #| "int myrand(void) {\n"
591 #| " next = next * 1103515245 + 12345;\n"
592 #| " return((unsigned)(next/65536) % 32768);\n"
593 #| "}\n"
594 msgid ""
595 "static unsigned long next = 1;\n"
596 "\\&\n"
597 "/* RAND_MAX assumed to be 32767 */\n"
598 "int myrand(void) {\n"
599 " next = next * 1103515245 + 12345;\n"
600 " return((unsigned)(next/65536) % 32768);\n"
601 "}\n"
602 "\\&\n"
603 "void mysrand(unsigned int seed) {\n"
604 " next = seed;\n"
605 "}\n"
606 msgstr ""
607 "/* предполагается, что RAND_MAX равно 32767 */\n"
608 "int myrand(void) {\n"
609 " next = next * 1103515245 + 12345;\n"
610 " return((unsigned)(next/65536) % 32768);\n"
611 "}\n"
612
613 #. type: TH
614 #: fedora-44 fedora-rawhide
615 #, no-wrap
616 msgid "2025-01-05"
617 msgstr "5 января 2025 г."
618
619 #. type: TH
620 #: fedora-44 fedora-rawhide
621 #, no-wrap
622 msgid "Linux man-pages 6.13"
623 msgstr "Страницы руководства Linux 6.13"
624
625 #. type: TH
626 #: mageia-cauldron
627 #, no-wrap
628 msgid "Linux man-pages 6.17"
629 msgstr "Страницы руководства Linux 6.17"
630
631 #. type: TH
632 #: opensuse-leap-16-1 opensuse-tumbleweed
633 #, no-wrap
634 msgid "Linux man-pages (unreleased)"
635 msgstr "Страницы руководства Linux (не выпущены)"