|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<!-- $Revision$ --> |
| 3 | +<!-- EN-Revision: 9b1673cf114a1e10c4563ab9223cb56aed552b89 Maintainer: PhilDaiguille Status: ready --> |
| 4 | +<!-- Reviewed: no --> |
| 5 | + |
| 6 | +<refentry xml:id="function.lcg-value" xmlns="http://docbook.org/ns/docbook"> |
| 7 | + <refnamediv> |
| 8 | + <refname>lcg_value</refname> |
| 9 | + <refpurpose>Generador de congruencia lineal combinada</refpurpose> |
| 10 | + </refnamediv> |
| 11 | + |
| 12 | + <refsynopsisdiv> |
| 13 | + &warn.deprecated.function-8-4-0; |
| 14 | + </refsynopsisdiv> |
| 15 | + |
| 16 | + <refsect1 role="description"> |
| 17 | + &reftitle.description; |
| 18 | + <methodsynopsis> |
| 19 | + <modifier role="attribute">#[\Deprecated]</modifier> |
| 20 | + <type>float</type><methodname>lcg_value</methodname> |
| 21 | + <void/> |
| 22 | + </methodsynopsis> |
| 23 | + <para> |
| 24 | + <function>lcg_value</function> devuelve un número pseudoaleatorio, |
| 25 | + comprendido entre 0 y 1. <function>lcg_value</function> combina dos |
| 26 | + generadores de congruencia, con períodos respectivos de |
| 27 | + <literal>2^31 - 85</literal> y <literal>2^31 - 249</literal>. |
| 28 | + El período de esta función es el producto de estos dos |
| 29 | + números primos (es decir, <literal>(2^31 - 85)*(2^31 - 249)</literal>). |
| 30 | + </para> |
| 31 | + &caution.cryptographically-insecure; |
| 32 | + <caution> |
| 33 | + <para> |
| 34 | + Escalar el valor de retorno a un intervalo diferente utilizando la multiplicación |
| 35 | + o la adición (una transformación afín) puede provocar un sesgo |
| 36 | + en el valor resultante, ya que los números de punto flotante no están distribuidos uniformemente |
| 37 | + en la línea numérica. |
| 38 | + Como no todos los valores pueden ser representados exactamente por un número de punto flotante, el |
| 39 | + resultado de la transformación afín también puede dar valores fuera |
| 40 | + del intervalo solicitado. |
| 41 | + </para> |
| 42 | + <para> |
| 43 | + Utilice <methodname>Random\Randomizer::getFloat</methodname> para generar un |
| 44 | + número de punto flotante aleatorio en un intervalo arbitrario. Utilice <methodname>Random\Randomizer::getInt</methodname> |
| 45 | + para generar un entero aleatorio en un intervalo arbitrario. |
| 46 | + </para> |
| 47 | + </caution> |
| 48 | + </refsect1> |
| 49 | + |
| 50 | + <refsect1 role="parameters"> |
| 51 | + &reftitle.parameters; |
| 52 | + &no.function.parameters; |
| 53 | + </refsect1> |
| 54 | + |
| 55 | + <refsect1 role="returnvalues"> |
| 56 | + &reftitle.returnvalues; |
| 57 | + <para> |
| 58 | + Un valor pseudoaleatorio, en el intervalo de 0.0 a 1.0 inclusive. |
| 59 | + </para> |
| 60 | + </refsect1> |
| 61 | + |
| 62 | + <refsect1 role="changelog"> |
| 63 | + &reftitle.changelog; |
| 64 | + <informaltable> |
| 65 | + <tgroup cols="2"> |
| 66 | + <thead> |
| 67 | + <row> |
| 68 | + <entry>&Version;</entry> |
| 69 | + <entry>&Description;</entry> |
| 70 | + </row> |
| 71 | + </thead> |
| 72 | + <tbody> |
| 73 | + <row> |
| 74 | + <entry>8.4.0</entry> |
| 75 | + <entry> |
| 76 | + Esta función ha sido deprecada. |
| 77 | + </entry> |
| 78 | + </row> |
| 79 | + </tbody> |
| 80 | + </tgroup> |
| 81 | + </informaltable> |
| 82 | +</refsect1> |
| 83 | + |
| 84 | + <refsect1 role="seealso"> |
| 85 | + &reftitle.seealso; |
| 86 | + <para> |
| 87 | + <simplelist> |
| 88 | + <member><methodname>Random\Randomizer::getFloat</methodname></member> |
| 89 | + <member><methodname>Random\Randomizer::getInt</methodname></member> |
| 90 | + <member><function>random_int</function></member> |
| 91 | + </simplelist> |
| 92 | + </para> |
| 93 | + </refsect1> |
| 94 | +</refentry> |
| 95 | +<!-- Keep this comment at the end of the file |
| 96 | +Local variables: |
| 97 | +mode: sgml |
| 98 | +sgml-omittag:t |
| 99 | +sgml-shorttag:t |
| 100 | +sgml-minimize-attributes:nil |
| 101 | +sgml-always-quote-attributes:t |
| 102 | +sgml-indent-step:1 |
| 103 | +sgml-indent-data:t |
| 104 | +indent-tabs-mode:nil |
| 105 | +sgml-parent-document:nil |
| 106 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" |
| 107 | +sgml-exposed-tags:nil |
| 108 | +sgml-local-catalogs:nil |
| 109 | +sgml-local-ecat-files:nil |
| 110 | +End: |
| 111 | +vim600: syn=xml fen fdm=syntax fdl=2 si |
| 112 | +vim: et tw=78 syn=sgml |
| 113 | +vi: ts=1 sw=1 |
| 114 | +--> |
0 commit comments