cortesi Sat Jul 7 11:18:25 2001 EDT Modified files: /phpdoc/it/functions math.xml Log: now in sync with en tree and corrected some typos and cases
Index: phpdoc/it/functions/math.xml diff -u phpdoc/it/functions/math.xml:1.10 phpdoc/it/functions/math.xml:1.11 --- phpdoc/it/functions/math.xml:1.10 Sat Jun 23 16:35:12 2001 +++ phpdoc/it/functions/math.xml Sat Jul 7 11:18:25 2001 @@ -1,6 +1,6 @@ <reference id="ref.math"> <title>Funzioni Matematiche</title> - <titleabbrev>Mat.</titleabbrev> + <titleabbrev>Mat</titleabbrev> <partintro> <sect1 id="math.intro"> @@ -17,80 +17,100 @@ <table> <title>Costanti Matematiche</title> <tgroup cols="3"> - <thead> - <row> - <entry>Costante</entry> - <entry>Valore</entry> - <entry>Descrizione</entry> - </row> - </thead> - <tbody> - <row> - <entry>M_PI</entry> - <entry>3.14159265358979323846</entry> - <entry>Il valore di π (pi-greco)</entry> - </row> - <row> - <entry>M_E</entry> - <entry>2.7182818284590452354</entry> - <entry>e</entry> - </row> - <row> - <entry>M_LOG2E</entry> - <entry>1.4426950408889634074</entry> - <entry>log_2 e</entry> - </row> - <row> - <entry>M_LOG10E</entry> - <entry>0.43429448190325182765</entry> - <entry>log_10 e</entry> - </row> - <row> - <entry>M_LN2</entry> - <entry>0.69314718055994530942</entry> - <entry>log_e 2</entry> - </row> - <row> - <entry>M_LN10</entry> - <entry>2.30258509299404568402</entry> - <entry>log_e 10</entry> - </row> - <row> - <entry>M_PI_2</entry> - <entry>1.57079632679489661923</entry> - <entry>pi/2</entry> - </row> - <row> - <entry>M_PI_4</entry> - <entry>0.78539816339744830962</entry> - <entry>pi/4</entry> - </row> - <row> - <entry>M_1_PI</entry> - <entry>0.31830988618379067154</entry> - <entry>1/pi</entry> - </row> - <row> - <entry>M_2_PI</entry> - <entry>0.63661977236758134308</entry> - <entry>2/pi</entry> - </row> - <row> - <entry>M_2_SQRTPI</entry> - <entry>1.12837916709551257390</entry> - <entry>2/sqrt(pi)</entry> - </row> - <row> - <entry>M_SQRT2</entry> - <entry>1.41421356237309504880</entry> - <entry>sqrt(2)</entry> - </row> - <row> - <entry>M_SQRT1_2</entry> - <entry>0.70710678118654752440</entry> - <entry>1/sqrt(2)</entry> - </row> - </tbody> + <thead> + <row> + <entry>Costante</entry> + <entry>Valore</entry> + <entry>Descrizione</entry> + </row> + </thead> + <tbody> + <row> + <entry>M_PI</entry> + <entry>3.14159265358979323846</entry> + <entry>Pi</entry> + </row> + <row> + <entry>M_E</entry> + <entry>2.7182818284590452354</entry> + <entry>e</entry> + </row> + <row> + <entry>M_LOG2E</entry> + <entry>1.4426950408889634074</entry> + <entry>log_2 e</entry> + </row> + <row> + <entry>M_LOG10E</entry> + <entry>0.43429448190325182765</entry> + <entry>log_10 e</entry> + </row> + <row> + <entry>M_LN2</entry> + <entry>0.69314718055994530942</entry> + <entry>log_e 2</entry> + </row> + <row> + <entry>M_LN10</entry> + <entry>2.30258509299404568402</entry> + <entry>log_e 10</entry> + </row> + <row> + <entry>M_PI_2</entry> + <entry>1.57079632679489661923</entry> + <entry>pi/2</entry> + </row> + <row> + <entry>M_PI_4</entry> + <entry>0.78539816339744830962</entry> + <entry>pi/4</entry> + </row> + <row> + <entry>M_1_PI</entry> + <entry>0.31830988618379067154</entry> + <entry>1/pi</entry> + </row> + <row> + <entry>M_2_PI</entry> + <entry>0.63661977236758134308</entry> + <entry>2/pi</entry> + </row> + <row> + <entry>M_SQRTPI</entry> + <entry>1.77245385090551602729</entry> + <entry>sqrt(pi) [4.0.2]</entry> + </row> + <row> + <entry>M_2_SQRTPI</entry> + <entry>1.12837916709551257390</entry> + <entry>2/sqrt(pi)</entry> + </row> + <row> + <entry>M_SQRT2</entry> + <entry>1.41421356237309504880</entry> + <entry>sqrt(2)</entry> + </row> + <row> + <entry>M_SQRT3</entry> + <entry>1.73205080756887729352</entry> + <entry>sqrt(3) [4.0.2]</entry> + </row> + <row> + <entry>M_SQRT1_2</entry> + <entry>0.70710678118654752440</entry> + <entry>1/sqrt(2)</entry> + </row> + <row> + <entry>M_LNPI</entry> + <entry>1.14472988584940017414</entry> + <entry>log_e(pi) [4.0.2]</entry> + </row> + <row> + <entry>M_EULER</entry> + <entry>0.57721566490153286061</entry> + <entry>Costante di Eulero [4.0.2]</entry> + </row> + </tbody> </tgroup> </table> Soltanto M_PI è disponibile nelle versioni precedenti alla PHP4RC1 (compresa). @@ -103,7 +123,7 @@ <refentry id="function.abs"> <refnamediv> <refname>abs</refname> - <refpurpose>valore assoluto</refpurpose> + <refpurpose>Valore assoluto</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -119,11 +139,10 @@ </refsect1> </refentry> - <refentry id="function.acos"> <refnamediv> <refname>acos</refname> - <refpurpose>arco coseno</refpurpose> + <refpurpose>Arco coseno</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -146,7 +165,7 @@ <refentry id="function.asin"> <refnamediv> <refname>asin</refname> - <refpurpose>arco seno</refpurpose> + <refpurpose>Arco seno</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -205,8 +224,8 @@ </funcsynopsis> <simpara> Questa funzione calcola l'arco tangente delle due variabili x e y. E' simile al calcolo dell'arco - tangente di y / x, eccetto per il fatto che viene tenuto in considearazione il segno di entrambi - gli argomenti per determinare il quadrato del risultato. + tangente di <parameter>y</parameter> / <parameter>x</parameter>, eccetto per il +fatto che viene tenuto in considearazione il segno di entrambi + gli argomenti per determinare il quadrante del risultato. </simpara> <simpara> La funzione restituisce il risultato in radianti, compreso fra -PI e PI (inclusi). @@ -221,7 +240,7 @@ <refentry id="function.base-convert"> <refnamediv> <refname>base_convert</refname> - <refpurpose>converte un numero fra basi arbitrarie</refpurpose> + <refpurpose>Converte un numero fra basi arbitrarie</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -241,11 +260,11 @@ <parameter>base_di_partenza</parameter> e <parameter>base_di_arrivo</parameter> devono essere comprese fra 2 e 36, inclusi. Cifre in numeri con una base maggiore di 10 saranno rappresentati con le lettere a-z, - con a significante 10, b significante 11 e z significante 36. + con a significante 10, b significante 11 e z significante 35. <example> <title>base_convert()</title> <programlisting role="php"> -$binary = base_convert($hexadecimal, 16, 2); +$binary = base_convert ($hexadecimal, 16, 2); </programlisting> </example> </para> @@ -256,7 +275,7 @@ <refentry id="function.bindec"> <refnamediv> <refname>BinDec</refname> - <refpurpose>da binario a decimale</refpurpose> + <refpurpose>Da binario a decimale</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -293,31 +312,28 @@ <title>Descrizione</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>ceil</function></funcdef> + <funcdef>float <function>ceil</function></funcdef> <paramdef>float <parameter>numero</parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> Restituisce il primo intero più grande di - <parameter>numero</parameter>. Usare la funzione <function>ceil</function> - su interi è assolutamente una perdita di tempo.</simpara> - - <simpara> - NOTA: La funzione <function>ceil</function> nel PHP/FI 2 restituiva - un valore float. Usare: <literal>$new = (double)ceil($numero);</literal> per ottenere - il medesimo vecchio risultato.</simpara> - + <parameter>numero</parameter>, se necessario. + Il valore restituito da <function>ceil</function> è ancora di tipo + <type>float</type>, poiché la gamma di valori del tipo <type>float</type> +è + solitamente più grande di quella del tipo <type>int</type>. + </simpara> <simpara> - Vedere anche <function>floor</function> e <function>round</function>.</simpara> - + Vedere anche <function>floor</function> e + <function>round</function>. + </simpara> </refsect1> </refentry> - <refentry id="function.cos"> <refnamediv> <refname>cos</refname> - <refpurpose>coseno</refpurpose> + <refpurpose>Coseno</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -342,7 +358,7 @@ <refentry id="function.decbin"> <refnamediv> <refname>DecBin</refname> - <refpurpose>da decimale a binario</refpurpose> + <refpurpose>Da decimale a binario</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -369,7 +385,7 @@ <refentry id="function.dechex"> <refnamediv> <refname>DecHex</refname> - <refpurpose>da decimale a esadecimale</refpurpose> + <refpurpose>Da decimale a esadecimale</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -396,7 +412,7 @@ <refentry id="function.decoct"> <refnamediv> <refname>DecOct</refname> - <refpurpose>da decimale a ottale</refpurpose> + <refpurpose>Da decimale a ottale</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -419,7 +435,9 @@ <refentry id="function.deg2rad"> <refnamediv> <refname>deg2rad</refname> - <refpurpose>Converte il numero dato in gradi nell'equivalente espresso in radianti</refpurpose> + <refpurpose> + Converte il numero dato in gradi nell'equivalente espresso in radianti + </refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -442,7 +460,7 @@ <refentry id="function.exp"> <refnamediv> <refname>exp</refname> - <refpurpose>e elevato alla potenza di...</refpurpose> + <refpurpose>e elevato alla potenza di ...</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -473,24 +491,20 @@ <title>Descrizione</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>floor</function></funcdef> + <funcdef>float <function>floor</function></funcdef> <paramdef>float <parameter>numero</parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> - Restituisce il primo intero più piccolo di - <parameter>numero</parameter>. Usare la funzione <function>floor</function> - su interi è assolutamente una perdita di tempo.</simpara> - - - <simpara> - NOTA: La funzione <function>floor</function> nel PHP/FI 2 restituiva - un valore float. Usare: <literal>$new = (double)floor($numero);</literal> per ottenere - il medesimo vecchio risultato.</simpara> - + <parameter>numero</parameter>, se necessario. + Il valore restituito da <function>floor</function> è ancora di tipo + <type>float</type>, poiché la gamma di valori del tipo <type>float</type> +è + solitamente più grande di quella del tipo <type>int</type>. + </simpara> <simpara> - Vedere anche <function>ceil</function> e <function>round</function>.</simpara> + Vedere anche <function>ceil</function> e <function>round</function>. + </simpara> </refsect1> </refentry> @@ -519,8 +533,8 @@ <function>srand</function> <function>mt_rand</function>, <function>mt_srand</function> e - <function>mt_getrandmax</function>.</simpara> - + <function>mt_getrandmax</function>. + </simpara> </refsect1> </refentry> @@ -528,7 +542,7 @@ <refentry id="function.hexdec"> <refnamediv> <refname>HexDec</refname> - <refpurpose>da esadecimale a decimale</refpurpose> + <refpurpose>Da esadecimale a decimale</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -540,23 +554,59 @@ </funcsynopsis> <para> Restituisce l'equivalente decimale di un numero esadecimale rappresentato - dall'argomento stringa_esadecimale. HexDec converte una + dall'argomento stringa_esadecimale. <function>hexdec</function> converte una stringa esadecimale in un numero decimale. Il più grande numero che può essere convertito è 7fffffff o 2147483647 espresso in decimale. </para> - <para> - Vedere anche la funzione <function>dechex</function>. + <function>hexdec</function> sostituisce ogni carattere non esadecimale + che incontra con <literal>0</literal>. In questo modo, tutti gli zeri + a sinistra sono ignorati, ma gli zeri a destra sono valutati. + <example> + <title>esempio di <function>hexdec</function></title> + <programlisting role="php"> +var_dump(hexdec("See")); +var_dump(hexdec("ee")); +// entrambi stampano "int(238)" + +var_dump(hexdec("that")); +var_dump(hexdec("a0")); +// entrambi stampano int(160) + </programlisting> + </example> </para> - + <para> + Vedere anche <function>dechex</function>. + </para> </refsect1> </refentry> + <refentry id="function.lcg-value"> + <refnamediv> + <refname>lcg_value</refname> + <refpurpose>Generatore combinato lineare congruenziale</refpurpose> + </refnamediv> + <refsect1> + <title>Descriztione</title> + <funcsynopsis> + <funcprototype> + <funcdef>double <function>lcg_value</function></funcdef> + <paramdef>void</paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>lcg_value</function> restituisce uno pseudo numero casuale + nell'intervallo (0, 1). La funzione combina due GC con periodo + di 2^31 - 85 e 2^31 - 249. Il periodo di questa funzione è uguale + al prodotto dei due primi. + </para> + </refsect1> + </refentry> <refentry id="function.log"> <refnamediv> <refname>log</refname> - <refpurpose>logaritmo naturale</refpurpose> + <refpurpose>Logaritmo naturale</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -577,7 +627,7 @@ <refentry id="function.log10"> <refnamediv> <refname>log10</refname> - <refpurpose>logaritmo base-10</refpurpose> + <refpurpose>Logaritmo base-10</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -588,17 +638,15 @@ </funcprototype> </funcsynopsis> <para> - Restituisce il logaritmo in base-10 di arg. + Restituisce il logaritmo in base-10 di <parameter>arg</parameter>. </para> - </refsect1> </refentry> - <refentry id="function.max"> <refnamediv> <refname>max</refname> - <refpurpose>trova il valore massimo</refpurpose> + <refpurpose>Trova il valore massimo</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -611,32 +659,29 @@ </funcprototype> </funcsynopsis> <para> - <function>max</function> restituisce il numericamente più grande dei valori dati come - parametro. + <function>max</function> restituisce il numericamente più grande dei + valori dati come parametri. </para> - <para> Se il primo parametro è un array, <function>max</function> restituisce il massimo dei valori di tale array. Se il primo parametro - è un integer, string o double, si ha bisogno almeno di due parametri + è un integer, string o double, si ha bisogno almeno di due parametri e <function>max</function> restituisce il maggiore di tali valori. Si può confrontare un numero illimitato di valori. </para> - <para> Se uno o più valori sono double, tutti i valori saranno considerati come double, e verrà restituito un double. Se nessuno dei - valori è double, tutti verranno considerati come integer, e + valori è double, tutti verranno considerati come integer, e verrà restituito un integer. </para> - </refsect1> </refentry> <refentry id="function.min"> <refnamediv> <refname>min</refname> - <refpurpose>trova il valore minimo</refpurpose> + <refpurpose>Trova il valore minimo</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -665,27 +710,24 @@ valori è double, tutti verranno considerati come integer, e verrà restituito un integer. </para> - </refsect1> </refentry> - - <refentry id="function.mt-rand"> <refnamediv> <refname>mt_rand</refname> - <refpurpose>genera un valore casuale migliore</refpurpose> + <refpurpose>Genera un valore casuale migliore</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mt_rand</function></funcdef> - <paramdef> - <parameter><optional>int min</optional></parameter> + <paramdef>int + <parameter><optional>min</optional></parameter> </paramdef> - <paramdef> - <parameter><optional>int max</optional></parameter> + <paramdef>int + <parameter><optional>max</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> @@ -697,8 +739,8 @@ per questa. Usa un generatore di numeri casuali con caratteristiche conosciute, il Mersenne Twister, che assicura numeri casuali che dovrebbero essere adatti per scopi crittografici - e che è mediamente quattro volte più veloce di libc. L'homepage - del Mersenne Twister può essere trovata qui: <ulink + e che è mediamente quattro volte più veloce di libc. L'Homepage + del Mersenne Twister può essere trovata qui: <ulink url="&url.mersenne;">&url.mersenne;</ulink>, e una versione ottimizzata del codice sorgente di MT è disponibile a questo inidrizzo: <ulink url="&url.mersenne.twister;">&url.mersenne.twister;</ulink>. @@ -732,11 +774,10 @@ </refsect1> </refentry> - <refentry id="function.mt-srand"> <refnamediv> <refname>mt_srand</refname> - <refpurpose>inizializza un generatore di numeri casuali migliore</refpurpose> + <refpurpose>Inizializza un generatore di numeri casuali migliore</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -746,34 +787,30 @@ <paramdef>int <parameter>seme</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> Inizializza il generatore di numeri casuali con il parametro <parameter>seme</parameter>. - <informalexample> <programlisting> // inizializza usando i microsecondi passati dall'ultimo secondo "intero" mt_srand((double)microtime()*1000000); $valorecasuale = mt_rand(); </programlisting> - </informalexample></para> - + </informalexample> + </para> <simpara> Vedere anche <function>mt_rand</function>, - <function>mt_getrandmax</function>, - <function>srand</function>, + <function>mt_getrandmax</function>, <function>srand</function>, <function>rand</function> e - <function>getrandmax</function>.</simpara> - + <function>getrandmax</function>. + </simpara> </refsect1> </refentry> - <refentry id="function.mt-getrandmax"> <refnamediv> <refname>mt_getrandmax</refname> - <refpurpose>mostra il più grande valore casuale disponibile</refpurpose> + <refpurpose>Mostra il più grande valore casuale disponibile</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -783,26 +820,23 @@ <paramdef>void </paramdef> </funcprototype> </funcsynopsis> - <simpara> Restituisce il massimo valore che può essere restituito da una chiamata alla funzione - <function>mt_rand</function>.</simpara> - + <function>mt_rand</function>. + </simpara> <simpara> Vedere anche <function>mt_rand</function>, - <function>mt_srand</function> - <function>rand</function>, + <function>mt_srand</function>, <function>rand</function>, <function>srand</function> e - <function>getrandmax</function>.</simpara> - + <function>getrandmax</function>. + </simpara> </refsect1> </refentry> - <refentry id="function.number-format"> <refnamediv> <refname>number_format</refname> - <refpurpose>formatta un numero raggruppando le migliaia</refpurpose> + <refpurpose>Formatta un numero raggruppando le migliaia</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -837,13 +871,60 @@ dei decimali e <parameter>separatore_migliaia</parameter> invece di una virgola (",") fra ciascun gruppo di migliaia. </para> + <note> + <para> + Viene usato solo il primo carattere di +<parameter>separatore_migliaia</parameter>. + Per esempio, se si usa <literal>foo</literal> come + <parameter>separatore_migliaia</parameter> sul numero + <literal>1000</literal>, <function>number_format</function> restituirà + <literal>1f000</literal>. + </para> + </note> + <para> + <example> + <title>Esempio di <function>number_format</function></title> + <para> + Si noti che la notazione Francese solitamente usa due decimali, + la virgola (',') come separatore decimale, e lo spazio (' ') come + separatore delle migliaia. Questo si può ottenere usando questa linea: + </para> + <programlisting role="php"> +<?php + + $numero = 1234.56; + + // notazione inglese (predefinita) + $numero_in_formato_inglese = number_format($numero); + // 1,234.56 + + // notazione francese + $numero_in_formato_francese = number_format($numero, 2, ',', ' '); + // 1 234,56 + + + $numero = 1234.5678; + + // notazione inglese senza separatore delle migliaia + $numero_in_formato_inglese = number_format($numero, 2, '.', ''); + // 1234.56 + +?> + </programlisting> + </example> + </para> + <note> + <para> + Vedere anche: <function>sprintf</function>, + <function>printf</function> e <function>sscanf</function>. + </para> + </note> </refsect1> </refentry> <refentry id="function.octdec"> <refnamediv> <refname>OctDec</refname> - <refpurpose>da ottale a decimale</refpurpose> + <refpurpose>Da ottale a decimale</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -860,18 +941,16 @@ numero che può essere convertito è 17777777777 o 2147483647 in decimale. </para> - <para> Vedere anche <function>decoct</function>. </para> - </refsect1> </refentry> <refentry id="function.pi"> <refnamediv> <refname>pi</refname> - <refpurpose>restituisce il valore di pi-greco</refpurpose> + <refpurpose>Restituisce il valore di pi</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -881,18 +960,26 @@ <paramdef>void </paramdef> </funcprototype> </funcsynopsis> - <simpara> - Restituisce una appossimazione di pi-greco.</simpara> + Restituisce una appossimazione di pi. + </simpara> + <para> + <informalexample> + <programlisting> + +echo pi(); +// stamperà 3.1415926535898 + </programlisting> + </informalexample> + </para> </refsect1> </refentry> - <refentry id="function.pow"> <refnamediv> <refname>pow</refname> - <refpurpose>espressione esponenziale</refpurpose> + <refpurpose>Espressione esponenziale</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -904,22 +991,22 @@ </funcprototype> </funcsynopsis> <para> - Restituisce base elevato alla potenza di esp. + Restituisce <parameter>base</parameter> elevato alla potenza di + <parameter>esp<parameter>. Se questo non può essere computato, + <function>exp</function> restituirà <literal>NAN</literal>. </para> - <para> Vedere anche <function>exp</function>. </para> - </refsect1> </refentry> - <refentry id="function.rad2deg"> <refnamediv> <refname>rad2deg</refname> - <refpurpose>Converte un numero in radianti nell'equivalente numero in gradi</refpurpose> - </refnamediv> + <refpurpose> + Converte un numero in radianti nell'equivalente numero in gradi</refpurpose> + </refnamediv> <refsect1> <title>Descrizione</title> <funcsynopsis> @@ -938,7 +1025,6 @@ </refsect1> </refentry> - <refentry id="function.rand"> <refnamediv> <refname>rand</refname> @@ -960,8 +1046,8 @@ <simpara> Se chiamata senza i parametri opzionali <parameter>min</parameter>, <parameter>max</parameter>, <function>rand</function> - restituisce un valore pseudo-casuale compreso fra 0 e - <constant>RAND_MAX</constant>. Se ad esempio si desidera un numero casuale + restituisce un valore pseudo casuale compreso fra 0 e + <constant>RAND_MAX</constant>. Se ad esempio si desidera un numero casuale compreso fra 5 e 15 (inclusi) usare <literal>rand (5, 15)</literal>. </simpara> @@ -988,11 +1074,10 @@ </refsect1> </refentry> - <refentry id="function.round"> <refnamediv> <refname>round</refname> - <refpurpose>Arrotonda un numero non intero.</refpurpose> + <refpurpose>Arrotonda un numero non intero</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -1000,38 +1085,42 @@ <funcprototype> <funcdef>double <function>round</function></funcdef> <paramdef>double <parameter>val</parameter></paramdef> - <paramdef> - <parameter><optional>int precisione</optional></parameter> - </paramdef> + <paramdef>int + <parameter><optional>precisione</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> - <para> - Restituisce il valore arrotondato di <parameter>val</parameter> con la precisione specificata. - + Restituisce il valore arrotondato di <parameter>val</parameter> con + la <parameter>precisione</parameter> specificata + (numero di cifre dopo il punto decimale. <informalexample> <programlisting> -$foo = round( 3.4 ); // $foo == 3.0 -$foo = round( 3.5 ); // $foo == 4.0 -$foo = round( 3.6 ); // $foo == 4.0 +$foo = round (3.4); // $foo == 3.0 +$foo = round (3.5); // $foo == 4.0 +$foo = round (3.6); // $foo == 4.0 -$foo = round( 1.95583 , 2 ); // $foo == 1.96 +$foo = round (1.95583, 2); // $foo == 1.96 </programlisting> </informalexample> </para> - + <note> + <simpara> + Il parametro <parameter>precisione</parameter> è disponibile + solo nel PHP 4. + </simpara> + </note> <simpara> - Vedere anche <function>ceil</function> e <function>floor</function>. + Vedere anche <function>ceil</function> e + <function>floor</function>. </simpara> - </refsect1> </refentry> - <refentry id="function.sin"> <refnamediv> <refname>sin</refname> - <refpurpose>seno</refpurpose> + <refpurpose>Seno</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -1044,11 +1133,9 @@ <para> Restituisce il seno di arg in radianti. </para> - <para> Vedere anche <function>cos</function> e <function>tan</function>. </para> - </refsect1> </refentry> @@ -1056,7 +1143,7 @@ <refentry id="function.sqrt"> <refnamediv> <refname>sqrt</refname> - <refpurpose>radice quadrata</refpurpose> + <refpurpose>Radice quadrata</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -1066,15 +1153,12 @@ <paramdef>float <parameter>arg</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> - Restituisce la radice quadrata di arg. + Restituisce la radice quadrata di <parameter>arg</parameter>. </para> - </refsect1> </refentry> - <refentry id="function.srand"> <refnamediv> <refname>srand</refname> @@ -1088,11 +1172,9 @@ <paramdef>int <parameter>seme</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> Inizializza il generatore di num casuali con <parameter>seme</parameter>. - <informalexample> <programlisting> // inizializza usando i microsecondi passati dall'ultimo secondo "intero" @@ -1101,22 +1183,19 @@ </programlisting> </informalexample> </para> - <simpara> Vedere anche <function>rand</function>, - <function>getrandmax</function>, - <function>mt_rand</function>, + <function>getrandmax</function>, <function>mt_rand</function>, <function>mt_srand</function> e - <function>mt_getrandmax</function>.</simpara> - + <function>mt_getrandmax</function>. + </simpara> </refsect1> </refentry> - <refentry id="function.tan"> <refnamediv> <refname>tan</refname> - <refpurpose>tangente</refpurpose> + <refpurpose>Tangente</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> @@ -1129,15 +1208,12 @@ <para> Restituisce la tangente di arg in radianti. </para> - <para> Vedere anche <function>sin</function> e <function>cos</function>. </para> - </refsect1> </refentry> - </reference> <!-- Keep this comment at the end of the file @@ -1156,3 +1232,4 @@ sgml-local-ecat-files:nil End: --> +