cvs: phpdoc-fr /reference/math constants.xml reference.xml /reference/math/functions abs.xml acos.xml acosh.xml asin.xml asinh.xml atan.xml atan2.xml
atanh.xml base-convert.xml bindec.xml ceil.xml cos.xml decbin.xml dechex.xml decoct.xml exp.xml expm1.xml floor.xml fmod.xml getrandmax.xml hexdec.xml
hypot.xml is-finite.xml is-infinite.xml is-nan.xml log.xml log10.xml log1p.xml max.xml min.xml mt-getrandmax.xml mt-rand.xml mt-srand.xml octdec.xml
pi.xml pow.xml rand.xml round.xml sin.xml sqrt.xml srand.xml tan.xml

From: Date: Sun, 29 Jun 2003 15:10:24 +0000
Subject: cvs: phpdoc-fr /reference/math constants.xml reference.xml /reference/math/functions abs.xml acos.xml acosh.xml asin.xml asinh.xml atan.xml atan2.xml
atanh.xml base-convert.xml bindec.xml ceil.xml cos.xml decbin.xml dechex.xml decoct.xml exp.xml expm1.xml floor.xml fmod.xml getrandmax.xml hexdec.xml
hypot.xml is-finite.xml is-infinite.xml is-nan.xml log.xml log10.xml log1p.xml max.xml min.xml mt-getrandmax.xml mt-rand.xml mt-srand.xml octdec.xml
pi.xml pow.xml rand.xml round.xml sin.xml sqrt.xml srand.xml tan.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-574@lists.php.net to get a copy of this message
dams Sun Jun 29 11:10:24 2003 EDT Added files: /phpdoc-fr/reference/math constants.xml /phpdoc-fr/reference/math/functions expm1.xml fmod.xml hypot.xml is-finite.xml is-infinite.xml is-nan.xml log1p.xml Modified files: /phpdoc-fr/reference/math reference.xml /phpdoc-fr/reference/math/functions abs.xml acos.xml acosh.xml asin.xml asinh.xml atan.xml atan2.xml atanh.xml base-convert.xml bindec.xml ceil.xml cos.xml decbin.xml dechex.xml decoct.xml exp.xml floor.xml getrandmax.xml hexdec.xml log.xml log10.xml max.xml min.xml mt-getrandmax.xml mt-rand.xml mt-srand.xml octdec.xml pi.xml pow.xml rand.xml round.xml sin.xml sqrt.xml srand.xml tan.xml Log: keeping up with en tre

Index: phpdoc-fr/reference/math/reference.xml diff -u phpdoc-fr/reference/math/reference.xml:1.2 phpdoc-fr/reference/math/reference.xml:1.3 --- phpdoc-fr/reference/math/reference.xml:1.2 Mon Apr 15 20:54:12 2002 +++ phpdoc-fr/reference/math/reference.xml Sun Jun 29 11:10:23 2003 @@ -1,129 +1,49 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<reference id="ref.math"> - <title>Math&eacute;matiques</title> - <titleabbrev>Maths</titleabbrev> - <partintro> - <section id="math.intro"> - <title>Introduction</title> - <para> +<!-- $Revision: 1.3 $ --> + <reference id="ref.math"> + <title>Math&eacute;matiques</title> + <titleabbrev>Maths</titleabbrev> + + <partintro> + <section id="math.intro"> + &reftitle.intro; + <para> Ces fonctions ne sont capables de manipuler que des entiers <type>integer</type>, ou nombres &agrave; virgule flottante (<type>float</type>). Si vous avez besoin de manipuler des nombres plus grands, reportez-vous aux fonctions math&eacute;matiques sur des <link linkend="ref.bc">nombres de grande taille</link>. - </para> - <section id="math.constants"> - <title>Constantes math&eacute;matiques</title> - <para> - Les valeurs suivantes sont d&eacute;finies comme des constantes en PHP : - <table> - <title>Constantes math&eacute;matiques</title> - <tgroup cols="3"> - <thead> - <row> - <entry>Constante</entry> - <entry>Valeur</entry> - <entry>Description</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>Euler constant [4.0.2]</entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </section> - </section> - </partintro> + </para> + </section> + + <section id="math.requirements"> + &reftitle.required; + &no.requirement; + </section> + + <section id="math.installation"> + &reftitle.install; + &no.install; + </section> + + <section id="math.configuration"> + &reftitle.runtime; + &no.config; + </section> + + <section id="math.resources"> + &reftitle.resources; + &no.resource; + </section> + + &reference.math.constants; + + </partintro> &reference.math.functions; -</reference> + </reference> + <!-- Keep this comment at the end of the file Local variables: mode: sgml Index: phpdoc-fr/reference/math/functions/abs.xml diff -u phpdoc-fr/reference/math/functions/abs.xml:1.1 phpdoc-fr/reference/math/functions/abs.xml:1.2 --- phpdoc-fr/reference/math/functions/abs.xml:1.1 Sun Apr 14 20:32:03 2002 +++ phpdoc-fr/reference/math/functions/abs.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'abs' in en/ tree in rev 1.2 --> <refentry id="function.abs"> <refnamediv> - <refname>Abs</refname> + <refname>abs</refname> <refpurpose>Valeur absolue</refpurpose> </refnamediv> <refsect1> @@ -19,6 +19,16 @@ est aussi un nombre &agrave; virgule flottante (<type>float</type>), sinon, c'est un entier (<type>integer</type>). </para> + <example> + <title>Exemple avec <function>abs</function></title> + <programlisting role="php"> +<![CDATA[ +$abs = abs(-4.2); // $abs = 4.2; (double/float) +$abs2 = abs(5); // $abs2 = 5; (integer) +$abs3 = abs(-5); // $abs3 = 5; (integer) +]]> + </programlisting> + </example> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/acos.xml diff -u phpdoc-fr/reference/math/functions/acos.xml:1.1 phpdoc-fr/reference/math/functions/acos.xml:1.2 --- phpdoc-fr/reference/math/functions/acos.xml:1.1 Sun Apr 14 20:32:03 2002 +++ phpdoc-fr/reference/math/functions/acos.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'acos' in en/ tree in rev 1.57 --> <refentry id="function.acos"> <refnamediv> - <refname>Acos</refname> + <refname>acos</refname> <refpurpose>arc cosinus</refpurpose> </refnamediv> <refsect1> @@ -15,9 +15,14 @@ <para> <function>acos</function> retourne l'arc cosinus de <parameter>arg</parameter> (<parameter>arg</parameter> en radians). + <function>acos</function> est la fonction inverse de + <function>cos</function>, ce qui signifie que + <literal>a==cos(acos(a))</literal> pour toute valeur qui soit + dans l'intervalle de validit&eacute; de <function>acos</function>'. </para> <para> Voir aussi + <function>acosh</function>, <function>asin</function> et <function>atan</function>. </para> Index: phpdoc-fr/reference/math/functions/acosh.xml diff -u phpdoc-fr/reference/math/functions/acosh.xml:1.1 phpdoc-fr/reference/math/functions/acosh.xml:1.2 --- phpdoc-fr/reference/math/functions/acosh.xml:1.1 Sun Apr 14 20:32:03 2002 +++ phpdoc-fr/reference/math/functions/acosh.xml Sun Jun 29 11:10:23 2003 @@ -20,9 +20,9 @@ &note.no-windows; <para> Voir aussi - <function>acos</function>, - <function>asin</function> et - <function>atan</function>. + <function>acos</function>, + <function>asinh</function> et + <function>atanh</function>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/asin.xml diff -u phpdoc-fr/reference/math/functions/asin.xml:1.1 phpdoc-fr/reference/math/functions/asin.xml:1.2 --- phpdoc-fr/reference/math/functions/asin.xml:1.1 Sun Apr 14 20:32:03 2002 +++ phpdoc-fr/reference/math/functions/asin.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'asin' in en/ tree in rev 1.57 --> <refentry id="function.asin"> <refnamediv> - <refname>Asin</refname> + <refname>asin</refname> <refpurpose>arc sinus</refpurpose> </refnamediv> <refsect1> @@ -15,9 +15,14 @@ <para> <function>asin</function> retourne l'arc sinus de <parameter>arg</parameter> (<parameter>arg</parameter> en radians). - </para> + <function>asin</function> est la fonction inverse de + <function>sin</function>, ce qui signifie que + <literal>a==sin(asin(a))</literal> pour toute valeur qui soit + dans l'intervalle de validit&eacute; de <function>asin</function>. + </para> <para> Voir aussi + <function>asinh</function>, <function>acos</function> et <function>atan</function>. </para> Index: phpdoc-fr/reference/math/functions/asinh.xml diff -u phpdoc-fr/reference/math/functions/asinh.xml:1.1 phpdoc-fr/reference/math/functions/asinh.xml:1.2 --- phpdoc-fr/reference/math/functions/asinh.xml:1.1 Sun Apr 14 20:32:04 2002 +++ phpdoc-fr/reference/math/functions/asinh.xml Sun Jun 29 11:10:23 2003 @@ -20,9 +20,9 @@ &note.no-windows; <para> Voir aussi - <function>asin</function>, - <function>acos</function> et - <function>atan</function>. + <function>asin</function>, + <function>acosh</function> et + <function>atanh</function>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/atan.xml diff -u phpdoc-fr/reference/math/functions/atan.xml:1.1 phpdoc-fr/reference/math/functions/atan.xml:1.2 --- phpdoc-fr/reference/math/functions/atan.xml:1.1 Sun Apr 14 20:32:04 2002 +++ phpdoc-fr/reference/math/functions/atan.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'atan' in en/ tree in rev 1.57 --> <refentry id="function.atan"> <refnamediv> - <refname>Atan</refname> + <refname>atan</refname> <refpurpose>arc tangent</refpurpose> </refnamediv> <refsect1> @@ -15,11 +15,16 @@ <para> <function>atan</function> retourne l'arc tangent de <parameter>arg</parameter> (<parameter>arg</parameter> en radians). + <function>atan</function> est la fonction inverse de + <function>tan</function>, ce qui signifie que + <literal>a==tan(atan(a))</literal> pour toute valeur qui soit dans + l'intervalle de validit&eacute; de <function>atan</function>. </para> <para> Voir aussi - <function>acos</function> et - <function>atan</function>. + <function>atanh</function>, + <function>asin</function> et + <function>acos</function>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/atan2.xml diff -u phpdoc-fr/reference/math/functions/atan2.xml:1.1 phpdoc-fr/reference/math/functions/atan2.xml:1.2 --- phpdoc-fr/reference/math/functions/atan2.xml:1.1 Sun Apr 14 20:32:04 2002 +++ phpdoc-fr/reference/math/functions/atan2.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'atan2' in en/ tree in rev 1.2 --> <refentry id="function.atan2"> <refnamediv> - <refname>Atan2</refname> + <refname>atan2</refname> <refpurpose>arc tangent de deux variables</refpurpose> </refnamediv> <refsect1> Index: phpdoc-fr/reference/math/functions/atanh.xml diff -u phpdoc-fr/reference/math/functions/atanh.xml:1.1 phpdoc-fr/reference/math/functions/atanh.xml:1.2 --- phpdoc-fr/reference/math/functions/atanh.xml:1.1 Sun Apr 14 20:32:04 2002 +++ phpdoc-fr/reference/math/functions/atanh.xml Sun Jun 29 11:10:23 2003 @@ -20,9 +20,9 @@ &note.no-windows; <para> Voir aussi - <function>atan</function>, - <function>asin</function> et - <function>acos</function>. + <function>atan</function>, + <function>asinh</function> et + <function>acosh</function>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/base-convert.xml diff -u phpdoc-fr/reference/math/functions/base-convert.xml:1.1 phpdoc-fr/reference/math/functions/base-convert.xml:1.2 --- phpdoc-fr/reference/math/functions/base-convert.xml:1.1 Sun Apr 14 20:32:04 2002 +++ phpdoc-fr/reference/math/functions/base-convert.xml Sun Jun 29 11:10:23 2003 @@ -4,7 +4,7 @@ <refentry id="function.base-convert"> <refnamediv> <refname>base_convert</refname> - <refpurpose>Convertit un nombre entre des bases arbitraires.</refpurpose> + <refpurpose>Convertit un nombre entre des bases arbitraires</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -26,11 +26,13 @@ &agrave; 10 seront repr&eacute;sent&eacute;s par les lettres de A &agrave; Z, avec A = 10 et Z = 36. <example> - <title><function>base_convert</function></title> + <title>Exemple avec <function>base_convert</function></title> <programlisting role="php"> -&lt;?php +<![CDATA[ +<?php $binary = base_convert($hexadecimal, 16, 2); -?&gt; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/math/functions/bindec.xml diff -u phpdoc-fr/reference/math/functions/bindec.xml:1.1 phpdoc-fr/reference/math/functions/bindec.xml:1.2 --- phpdoc-fr/reference/math/functions/bindec.xml:1.1 Sun Apr 14 20:32:04 2002 +++ phpdoc-fr/reference/math/functions/bindec.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'bindec' in en/ tree in rev 1.2 --> <refentry id="function.bindec"> <refnamediv> - <refname>BinDec</refname> + <refname>bindec</refname> <refpurpose>Convertit de binaire en d&eacute;cimal</refpurpose> </refnamediv> <refsect1> Index: phpdoc-fr/reference/math/functions/ceil.xml diff -u phpdoc-fr/reference/math/functions/ceil.xml:1.1 phpdoc-fr/reference/math/functions/ceil.xml:1.2 --- phpdoc-fr/reference/math/functions/ceil.xml:1.1 Sun Apr 14 20:32:04 2002 +++ phpdoc-fr/reference/math/functions/ceil.xml Sun Jun 29 11:10:23 2003 @@ -3,36 +3,33 @@ <!-- last change to 'ceil' in en/ tree in rev 1.2 --> <refentry id="function.ceil"> <refnamediv> - <refname>Ceil</refname> + <refname>ceil</refname> <refpurpose>Arrondit au nombre sup&eacute;rieur</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>float</type><methodname>ceil</methodname> - <methodparam><type>float</type><parameter>number</parameter></methodparam> - </methodsynopsis> + <methodsynopsis> + <type>float</type><methodname>ceil</methodname> + <methodparam><type>float</type><parameter>value</parameter></methodparam> + </methodsynopsis> <para> <function>ceil</function> retourne l'entier sup&eacute;rieur du - nombre <parameter>number</parameter>. Utiliser + nombre <parameter>value</parameter>. Utiliser <function>ceil</function> sur un entier ne sert &agrave; rien. La valeur retourn&eacute;e est un nombre &agrave; virgule flottante (<type>float</type>), car ces nombres peuvent &ecirc;tre plus grands que les entiers. <informalexample> <programlisting role="php"> -&lt;?php - $x = ceil(4.25); -// ce qui donne $x=5 -?&gt; +<![CDATA[ +<?php + echo ceil(4.3); // 5 + echo ceil(9.999); // 10 +?> +]]> </programlisting> </informalexample> </para> - <simpara> - NOTE: <function>ceil</function> sous PHP/FI 2 retournait un nombre &agrave; - virgule flottante. Utilisez: <literal>$new = (float)ceil($number);</literal> - pour retrouver le comportement traditionnel. - </simpara> <simpara> Voir aussi <function>floor</function> et Index: phpdoc-fr/reference/math/functions/cos.xml diff -u phpdoc-fr/reference/math/functions/cos.xml:1.1 phpdoc-fr/reference/math/functions/cos.xml:1.2 --- phpdoc-fr/reference/math/functions/cos.xml:1.1 Sun Apr 14 20:32:04 2002 +++ phpdoc-fr/reference/math/functions/cos.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'cos' in en/ tree in rev 1.2 --> <refentry id="function.cos"> <refnamediv> - <refname>Cos</refname> + <refname>cos</refname> <refpurpose>cosinus</refpurpose> </refnamediv> <refsect1> @@ -18,8 +18,10 @@ </para> <para> Voir aussi - <function>sin</function> et - <function>tan</function>. + <function>acos</function>, + <function>sin</function> + <function>tan</function> et + <function>deg2rad</function>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/decbin.xml diff -u phpdoc-fr/reference/math/functions/decbin.xml:1.1 phpdoc-fr/reference/math/functions/decbin.xml:1.2 --- phpdoc-fr/reference/math/functions/decbin.xml:1.1 Sun Apr 14 20:32:05 2002 +++ phpdoc-fr/reference/math/functions/decbin.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'decbin' in en/ tree in rev 1.2 --> <refentry id="function.decbin"> <refnamediv> - <refname>DecBin</refname> + <refname>decbin</refname> <refpurpose>Convertit de d&eacute;cimal en binaire</refpurpose> </refnamediv> <refsect1> Index: phpdoc-fr/reference/math/functions/dechex.xml diff -u phpdoc-fr/reference/math/functions/dechex.xml:1.1 phpdoc-fr/reference/math/functions/dechex.xml:1.2 --- phpdoc-fr/reference/math/functions/dechex.xml:1.1 Sun Apr 14 20:32:05 2002 +++ phpdoc-fr/reference/math/functions/dechex.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'dechex' in en/ tree in rev 1.2 --> <refentry id="function.dechex"> <refnamediv> - <refname>DecHex</refname> + <refname>dechex</refname> <refpurpose>Convertit de d&eacute;cimal en hexad&eacute;cimal </refpurpose> </refnamediv> <refsect1> Index: phpdoc-fr/reference/math/functions/decoct.xml diff -u phpdoc-fr/reference/math/functions/decoct.xml:1.1 phpdoc-fr/reference/math/functions/decoct.xml:1.2 --- phpdoc-fr/reference/math/functions/decoct.xml:1.1 Sun Apr 14 20:32:05 2002 +++ phpdoc-fr/reference/math/functions/decoct.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'decoct' in en/ tree in rev 1.8 --> <refentry id="function.decoct"> <refnamediv> - <refname>DecOct</refname> + <refname>decoct</refname> <refpurpose>Convertit de d&eacute;cimal en octal </refpurpose> </refnamediv> <refsect1> Index: phpdoc-fr/reference/math/functions/exp.xml diff -u phpdoc-fr/reference/math/functions/exp.xml:1.1 phpdoc-fr/reference/math/functions/exp.xml:1.2 --- phpdoc-fr/reference/math/functions/exp.xml:1.1 Sun Apr 14 20:32:05 2002 +++ phpdoc-fr/reference/math/functions/exp.xml Sun Jun 29 11:10:23 2003 @@ -3,8 +3,8 @@ <!-- last change to 'exp' in en/ tree in rev 1.2 --> <refentry id="function.exp"> <refnamediv> - <refname>Exp</refname> - <refpurpose>exponentielle</refpurpose> + <refname>exp</refname> + <refpurpose>Exponentielle</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -20,7 +20,8 @@ </para> <para> Voir aussi - <function>pow</function>. + <function>pow</function> et + <function>log</function>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/floor.xml diff -u phpdoc-fr/reference/math/functions/floor.xml:1.2 phpdoc-fr/reference/math/functions/floor.xml:1.3 --- phpdoc-fr/reference/math/functions/floor.xml:1.2 Sun Nov 17 11:27:28 2002 +++ phpdoc-fr/reference/math/functions/floor.xml Sun Jun 29 11:10:23 2003 @@ -3,26 +3,32 @@ <!-- last change to 'floor' in en/ tree in rev 1.2 --> <refentry id="function.floor"> <refnamediv> - <refname>Floor</refname> - <refpurpose>Arrondi &agrave; l'entier inf&eacute;rieur </refpurpose> + <refname>floor</refname> + <refpurpose>Arrondit &agrave; l'entier inf&eacute;rieur</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>float</type><methodname>floor</methodname> - <methodparam><type>float</type><parameter>number</parameter></methodparam> - </methodsynopsis> + <methodsynopsis> + <type>float</type><methodname>floor</methodname> + <methodparam><type>float</type><parameter>value</parameter></methodparam> + </methodsynopsis> <simpara> <function>floor</function> retourne l'entier inf&eacute;rieur - du nombre <parameter>number</parameter>. La valeur retourn&eacute;e + du nombre <parameter>value</parameter>. La valeur retourn&eacute;e est un nombre &agrave; virgule flottante, (<type>float</type>) car ces nombres peuvent &ecirc;tre plus grands que les entiers. </simpara> - <simpara> - NOTE: <function>floor</function> sous PHP/FI retournait un float. - Utilisez: <literal>$new = (float)floor($number);</literal> - pour retrouver le comportement traditionnel. - </simpara> + <example> + <title>Exemple avec <function>floor</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + echo floor(4.3); // 4 + echo floor(9.999); // 9 +?> +]]> + </programlisting> + </example> <simpara> Voir aussi <function>ceil</function> et Index: phpdoc-fr/reference/math/functions/getrandmax.xml diff -u phpdoc-fr/reference/math/functions/getrandmax.xml:1.1 phpdoc-fr/reference/math/functions/getrandmax.xml:1.2 --- phpdoc-fr/reference/math/functions/getrandmax.xml:1.1 Sun Apr 14 20:32:06 2002 +++ phpdoc-fr/reference/math/functions/getrandmax.xml Sun Jun 29 11:10:23 2003 @@ -4,7 +4,7 @@ <refentry id="function.getrandmax"> <refnamediv> <refname>getrandmax</refname> - <refpurpose>Plus grande valeur al&eacute;atoire possible.</refpurpose> + <refpurpose>Plus grande valeur al&eacute;atoire possible</refpurpose> </refnamediv> <refsect1> <title>Description</title> Index: phpdoc-fr/reference/math/functions/hexdec.xml diff -u phpdoc-fr/reference/math/functions/hexdec.xml:1.2 phpdoc-fr/reference/math/functions/hexdec.xml:1.3 --- phpdoc-fr/reference/math/functions/hexdec.xml:1.2 Fri May 16 03:52:26 2003 +++ phpdoc-fr/reference/math/functions/hexdec.xml Sun Jun 29 11:10:23 2003 @@ -27,7 +27,8 @@ <example> <title>Exemple avec <function>hexdec</function></title> <programlisting role="php"> -&lt;?php +<![CDATA[ +<?php var_dump(hexdec("Hop comme ceci")); var_dump(hexdec("0000c000e0cec0")); var_dump(hexdec("c000e0cec0")); @@ -35,7 +36,8 @@ var_dump(hexdec("aussi")); var_dump(hexdec("a0000")); // les deux affichent "int(655360)" -?&gt; +?> +]]> </programlisting> </example> </para> Index: phpdoc-fr/reference/math/functions/log.xml diff -u phpdoc-fr/reference/math/functions/log.xml:1.1 phpdoc-fr/reference/math/functions/log.xml:1.2 --- phpdoc-fr/reference/math/functions/log.xml:1.1 Sun Apr 14 20:32:06 2002 +++ phpdoc-fr/reference/math/functions/log.xml Sun Jun 29 11:10:23 2003 @@ -3,7 +3,7 @@ <!-- last change to 'log' in en/ tree in rev 1.2 --> <refentry id="function.log"> <refnamediv> - <refname>Log</refname> + <refname>log</refname> <refpurpose>Logarithme naturel (n&eacute;p&eacute;rien)</refpurpose> </refnamediv> <refsect1> @@ -11,11 +11,31 @@ <methodsynopsis> <type>float</type><methodname>log</methodname> <methodparam><type>float</type><parameter>arg</parameter></methodparam> + <methodparam choice="opt"><type>float</type><parameter>base</parameter></methodparam> </methodsynopsis> <para> <function>log</function> retourne le logarithme naturel (ou n&eacute;p&eacute;rien) de <parameter>arg</parameter>. - </para> + Si le param&egrave;tre optionnel <parameter>base</parameter> est + sp&eacute;cifi&eacute;, <function>log</function> retourn alors le + logarithme en base <parameter>base</parameter>. + </para> + <note> + <para> + Le param&egrave;tre <parameter>base</parameter> a &eacute;t&eacute; ajout&eacute; en + PHP version 4.3.0. + </para> + </note> + <para> + Vous pouvez toujours calculer le logarithme en base <literal>b</literal> + d'un nombre <literal>n</literal>, en utilisant la formule ; + <literal>logb(n) = log(n)/log(b)</literal>, o&ugrave; <literal>log</literal> + est le logarithme naturel ou n&eacute;p&eacute;rien. + </para> + <para> + Voir aussi + <function>exp</function>. + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/log10.xml diff -u phpdoc-fr/reference/math/functions/log10.xml:1.1 phpdoc-fr/reference/math/functions/log10.xml:1.2 --- phpdoc-fr/reference/math/functions/log10.xml:1.1 Sun Apr 14 20:32:06 2002 +++ phpdoc-fr/reference/math/functions/log10.xml Sun Jun 29 11:10:23 2003 @@ -3,8 +3,8 @@ <!-- last change to 'log10' in en/ tree in rev 1.2 --> <refentry id="function.log10"> <refnamediv> - <refname>Log10</refname> - <refpurpose>logarithme en base 10.</refpurpose> + <refname>log10</refname> + <refpurpose>logarithme en base 10</refpurpose> </refnamediv> <refsect1> <title>Description</title> Index: phpdoc-fr/reference/math/functions/max.xml diff -u phpdoc-fr/reference/math/functions/max.xml:1.1 phpdoc-fr/reference/math/functions/max.xml:1.2 --- phpdoc-fr/reference/math/functions/max.xml:1.1 Sun Apr 14 20:32:06 2002 +++ phpdoc-fr/reference/math/functions/max.xml Sun Jun 29 11:10:23 2003 @@ -4,15 +4,15 @@ <refentry id="function.max"> <refnamediv> <refname>max</refname> - <refpurpose>La plus grande valeur.</refpurpose> + <refpurpose>La plus grande valeur</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>number</type><methodname>max</methodname> - <methodparam><type>number</type><parameter>arg1</parameter></methodparam> - <methodparam><type>number</type><parameter>arg2</parameter></methodparam> - <methodparam><type>number</type><parameter>argn</parameter></methodparam> + <methodparam><type>mixed</type><parameter>arg1</parameter></methodparam> + <methodparam><type>mixed</type><parameter>arg2</parameter></methodparam> + <methodparam><type>mixed</type><parameter>argn</parameter></methodparam> </methodsynopsis> <para> <function>max</function> retourne la plus grande valeur @@ -34,6 +34,10 @@ Si aucune valeur n'est un nombre &agrave; virgule flottante, elles seront trait&eacute;es comme des entiers, et un entier sera retourn&eacute;. </para> + <para> + Voir aussi + <function>min</function>. + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/min.xml diff -u phpdoc-fr/reference/math/functions/min.xml:1.1 phpdoc-fr/reference/math/functions/min.xml:1.2 --- phpdoc-fr/reference/math/functions/min.xml:1.1 Sun Apr 14 20:32:07 2002 +++ phpdoc-fr/reference/math/functions/min.xml Sun Jun 29 11:10:23 2003 @@ -4,28 +4,34 @@ <refentry id="function.min"> <refnamediv> <refname>min</refname> - <refpurpose>La plus petite valeur.</refpurpose> + <refpurpose>La plus petite valeur</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>number</type><methodname>min</methodname> - <methodparam><type>number</type><parameter>arg1</parameter></methodparam> - <methodparam><type>number</type><parameter>arg2</parameter></methodparam> - <methodparam><type>number</type><parameter>argn</parameter></methodparam> - </methodsynopsis> + <methodsynopsis> + <type>number</type><methodname>min</methodname> + <methodparam><type>number</type><parameter>arg1</parameter></methodparam> + <methodparam><type>number</type><parameter>arg2</parameter></methodparam> + <methodparam choice="opt"><parameter>...</parameter></methodparam> + </methodsynopsis> + <methodsynopsis> + <type>number</type><methodname>min</methodname> + <methodparam><type>array</type><parameter>numbers</parameter></methodparam> + </methodsynopsis> <para> <function>min</function> retourne la plus petite valeur num&eacute;rique parmi les valeurs pass&eacute;es en param&egrave;tres. </para> - <para> - Si le premier param&egrave;tre est un tableau, <function>min</function> - retourne la plus petite valeur de ce tableau. Si le premier - param&egrave;tre est un entier, une cha&icirc;ne ou un nombre &agrave; virgule flottante, - <function>min</function> requiert au moins deux param&egrave;tres, et - retournera alors le plus petit d'entre eux. Le nombre d'arguments est alors - illimit&eacute;. - </para> + <para> + Dans la premi&egrave;re syntaxe, vous devez fournir au moins deux param&egrave;tres + &agrave; la fonction <function>min</function>, qui vous retournera la plus petite + de deux valeurs. Vous pouvez comparer un nombre illimit&eacute; de valeurs. Si l'une + d'entre elle est ind&eacute;finie, <function>min</function> &eacute;chouera. + </para> + <para> + Dans la seconde variante, <function>min</function> retourne la plus petite + valeur trouv&eacute;e dans le tableau <parameter>numbers</parameter>. + </para> <para> Si au moins une valeur est un nombre &agrave; virgule flottante, elles seront toutes trait&eacute;es comme des nombres &agrave; virgule flottante, et un nombre @@ -33,6 +39,34 @@ Si aucune valeur n'est un nombre &agrave; virgule flottante, elles seront trait&eacute;es comme des entiers, et un entier sera retourn&eacute;. </para> + <example> + <title>Exemple avec <function>min</function></title> + <programlisting> +<![CDATA[ +<?php +$a = 4; +$b = 9; +$c = 3; +$arr = array(99, 34, 11); + +// Vous pouvez impl&eacute;menter votre propre gestion d'erreur +// en cas d'&eacute;chec (une variable peut ne pas exister) +if (!$min_value = @min($a, $b, $c)) { + echo "Impossible de trouver la valeur minimale, essayez &agrave; nouveau!."; +} else { + echo "La valeur minimale est $min_value"; +} + +print min($arr); // 11 + +?> +]]> + </programlisting> + </example> + <para> + Voir aussi + <function>max</function>. + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/mt-getrandmax.xml diff -u phpdoc-fr/reference/math/functions/mt-getrandmax.xml:1.1 phpdoc-fr/reference/math/functions/mt-getrandmax.xml:1.2 --- phpdoc-fr/reference/math/functions/mt-getrandmax.xml:1.1 Sun Apr 14 20:32:07 2002 +++ phpdoc-fr/reference/math/functions/mt-getrandmax.xml Sun Jun 29 11:10:23 2003 @@ -4,7 +4,7 @@ <refentry id="function.mt-getrandmax"> <refnamediv> <refname>mt_getrandmax</refname> - <refpurpose>La plus grand valeur al&eacute;atoire possible.</refpurpose> + <refpurpose>La plus grand valeur al&eacute;atoire possible</refpurpose> </refnamediv> <refsect1> <title>Description</title> Index: phpdoc-fr/reference/math/functions/mt-rand.xml diff -u phpdoc-fr/reference/math/functions/mt-rand.xml:1.1 phpdoc-fr/reference/math/functions/mt-rand.xml:1.2 --- phpdoc-fr/reference/math/functions/mt-rand.xml:1.1 Sun Apr 14 20:32:07 2002 +++ phpdoc-fr/reference/math/functions/mt-rand.xml Sun Jun 29 11:10:23 2003 @@ -5,16 +5,16 @@ <refnamediv> <refname>mt_rand</refname> <refpurpose> - G&eacute;n&egrave;re une meilleure valeur al&eacute;atoire. + G&eacute;n&egrave;re une valeur al&eacute;atoire (meilleure m&eacute;thode) </refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>mt_rand</methodname> - <methodparam><type>int</type><parameter>min</parameter></methodparam> - <methodparam><type>int</type><parameter>max</parameter></methodparam> - </methodsynopsis> + <methodsynopsis> + <type>int</type><methodname>mt_rand</methodname> + <methodparam choice="opt"><type>int</type><parameter>min</parameter></methodparam> + <methodparam><type>int</type><parameter>max</parameter></methodparam> + </methodsynopsis> <simpara> De nombreux g&eacute;n&eacute;rateurs de nombres al&eacute;atoires provenant de vieilles biblioth&egrave;ques libcs ont des comportement @@ -26,9 +26,7 @@ connue, le " Mersenne Twister ", qui va produire des nombres utilisables en cryptographie, et qui est 4 fois plus rapide que la fonction standard libc. La "Homepage of the Mersenne Twister " est - <ulink url="&url.mersenne;">&url.mersenne;</ulink>. Une version optimis&eacute;e - des sources de MT est disponible &agrave; - <ulink url="&url.mersenne.twister;">&url.mersenne.twister;</ulink>. + <ulink url="&url.mersenne;">&url.mersenne;</ulink>. </simpara> <simpara> Appel&eacute;e sans les arguments optionnels <parameter>min</parameter> et @@ -37,10 +35,7 @@ Pour obtenir un nombre entre 5 et 15 inclus, il faut utiliser <literal>mt_rand(5,15)</literal>. </simpara> - <simpara> - N'oubliez pas d'initialiser le g&eacute;n&eacute;rateur de nombres - al&eacute;atoires avec <function>mt_srand</function>. - </simpara> + &note.randomseed; <note> <para> Dans les versions ant&eacute;rieures &agrave; la 3.0.7, la signification @@ -53,10 +48,8 @@ <simpara> Voir aussi <function>mt_srand</function>, - <function>mt_getrandmax</function>, - <function>srand</function>, - <function>rand</function> et - <function>getrandmax</function>. + <function>mt_getrandmax</function> et + <function>rand</function>. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/mt-srand.xml diff -u phpdoc-fr/reference/math/functions/mt-srand.xml:1.1 phpdoc-fr/reference/math/functions/mt-srand.xml:1.2 --- phpdoc-fr/reference/math/functions/mt-srand.xml:1.1 Sun Apr 14 20:32:07 2002 +++ phpdoc-fr/reference/math/functions/mt-srand.xml Sun Jun 29 11:10:23 2003 @@ -4,7 +4,7 @@ <refentry id="function.mt-srand"> <refnamediv> <refname>mt_srand</refname> - <refpurpose>Initialise une meilleure valeur al&eacute;atoire</refpurpose> + <refpurpose>Initialise une valeur al&eacute;atoire (meilleure m&eacute;thode)</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -15,23 +15,27 @@ <para> <function>mt_srand</function> initialise une meilleure valeur al&eacute;atoire avec <parameter>seed</parameter>. - <informalexample> - <programlisting role="php"> -&lt;?php -// initialise avec les microsecondes depuis la derni&egrave;re seconde enti&egrave;re - mt_srand((float) microtime()*1000000); - $randval = mt_rand(); -?&gt; - </programlisting> - </informalexample> - </para> + <example> + <title>Exemple avec <function>mt_srand</function></title> + <programlisting role="php"> +<![CDATA[ +// initialisation avec des microsecondes +function make_seed() { + list($usec, $sec) = explode(' ', microtime()); + return (float) $sec + ((float) $usec * 100000); +} +mt_srand(make_seed()); +$randval = mt_rand(); +]]> + </programlisting> + </example> + </para> + &note.randomseed; <simpara> Voir aussi <function>mt_rand</function>, - <function>mt_getrandmax</function>, - <function>srand</function>, - <function>rand</function> et - <function>getrandmax</function>. + <function>mt_getrandmax</function> et + <function>srand</function>. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/octdec.xml diff -u phpdoc-fr/reference/math/functions/octdec.xml:1.1 phpdoc-fr/reference/math/functions/octdec.xml:1.2 --- phpdoc-fr/reference/math/functions/octdec.xml:1.1 Sun Apr 14 20:32:08 2002 +++ phpdoc-fr/reference/math/functions/octdec.xml Sun Jun 29 11:10:24 2003 @@ -3,8 +3,8 @@ <!-- last change to 'octdec' in en/ tree in rev 1.2 --> <refentry id="function.octdec"> <refnamediv> - <refname>OctDec</refname> - <refpurpose>Convertit d'octal en d&eacute;cimal.</refpurpose> + <refname>octdec</refname> + <refpurpose>Convertit d'octal en d&eacute;cimal</refpurpose> </refnamediv> <refsect1> <title>Description</title> Index: phpdoc-fr/reference/math/functions/pi.xml diff -u phpdoc-fr/reference/math/functions/pi.xml:1.1 phpdoc-fr/reference/math/functions/pi.xml:1.2 --- phpdoc-fr/reference/math/functions/pi.xml:1.1 Sun Apr 14 20:32:08 2002 +++ phpdoc-fr/reference/math/functions/pi.xml Sun Jun 29 11:10:24 2003 @@ -14,16 +14,26 @@ </methodsynopsis> <simpara> <function>pi</function> retourne la valeur de pi. + La valeur retourn&eacute;e est de type <type>float</type>, et + est &agrave; la pr&eacute;cision indiqu&eacute;e par la directive + <link linkend="ini.precision">precision</link>, indiqu&eacute;e + dans le fichier &php.ini;, qui vaut par d&eacute;faut <literal>14</literal>. + De plus, vous pouvez utiliser la constante <constant>M_PI</constant>, + qui retourne un r&eacute;sultat identique &agrave; la fonction + <function>pi</function>. </simpara> <para> - <informalexample> + <example> + <title>Exemple avec <function>pi</function></title> <programlisting role="php"> -&lt;?php - echo pi(); -// 3.1415926535898 -?&gt; +<![CDATA[ +<?php + echo pi(); // 3.1415926535898 + echo M_PI; // 3.1415926535898 +?> +]]> </programlisting> - </informalexample> + </example> </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/pow.xml diff -u phpdoc-fr/reference/math/functions/pow.xml:1.1 phpdoc-fr/reference/math/functions/pow.xml:1.2 --- phpdoc-fr/reference/math/functions/pow.xml:1.1 Sun Apr 14 20:32:08 2002 +++ phpdoc-fr/reference/math/functions/pow.xml Sun Jun 29 11:10:24 2003 @@ -4,7 +4,7 @@ <refentry id="function.pow"> <refnamediv> <refname>pow</refname> - <refpurpose>Puissance</refpurpose> + <refpurpose>Expression exponentielle</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -25,16 +25,17 @@ <example> <title>Quelques exemples avec <function>pow</function></title> <programlisting role="php"> -&lt;?php - var_dump( pow(2,8) ); -// int(256) - echo pow(-1,20); -// 1 - echo pow(0, 0); -// 1 -echo pow(-1, 5.5); - // erreur -?&gt; +<![CDATA[ +<?php + +var_dump( pow(2,8) ); // int(256) +echo pow(-1,20); // 1 +echo pow(0, 0); // 1 + +echo pow(-1, 5.5); // error + +?> +]]> </programlisting> </example> <warning> @@ -48,7 +49,8 @@ </warning> <para> Voir aussi - <function>exp</function>. + <function>exp</function> et + <function>sqrt</function>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/rand.xml diff -u phpdoc-fr/reference/math/functions/rand.xml:1.1 phpdoc-fr/reference/math/functions/rand.xml:1.2 --- phpdoc-fr/reference/math/functions/rand.xml:1.1 Sun Apr 14 20:32:08 2002 +++ phpdoc-fr/reference/math/functions/rand.xml Sun Jun 29 11:10:24 2003 @@ -4,15 +4,15 @@ <refentry id="function.rand"> <refnamediv> <refname>rand</refname> - <refpurpose>G&eacute;n&egrave;re une valeur al&eacute;atoire.</refpurpose> + <refpurpose>G&eacute;n&egrave;re une valeur al&eacute;atoire</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>rand</methodname> - <methodparam><type>int</type><parameter>min</parameter></methodparam> - <methodparam><type>int</type><parameter>max</parameter></methodparam> - </methodsynopsis> + <methodsynopsis> + <type>int</type><methodname>rand</methodname> + <methodparam choice="opt"><type>int</type><parameter>min</parameter></methodparam> + <methodparam><type>int</type><parameter>max</parameter></methodparam> + </methodsynopsis> <simpara> Appel&eacute;e sans les options <parameter>min</parameter> et <parameter>max</parameter>, <function>rand</function> retourne un @@ -20,10 +20,7 @@ Si vous voulez un nombre al&eacute;atoire entre 5 et 15 (inclus), par exemple, utilisez <literal>rand (5, 15)</literal>. </simpara> - <simpara> - N'oubliez pas d'initialiser le g&eacute;n&eacute;rateur de nombres - al&eacute;atoires avec <function>srand</function>. - </simpara> + &note.randomseed; <note> <para> Dans les versions ant&eacute;rieures &agrave; la 3.0.7 la signification @@ -36,10 +33,8 @@ <simpara> Voir aussi <function>srand</function>, - <function>getrandmax</function>, - <function>mt_rand</function>, - <function>mt_srand</function> et - <function>mt_getrandmax</function>. + <function>mt_rand</function> et + <function>getrandmax</function>. </simpara> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/round.xml diff -u phpdoc-fr/reference/math/functions/round.xml:1.1 phpdoc-fr/reference/math/functions/round.xml:1.2 --- phpdoc-fr/reference/math/functions/round.xml:1.1 Sun Apr 14 20:32:08 2002 +++ phpdoc-fr/reference/math/functions/round.xml Sun Jun 29 11:10:24 2003 @@ -4,7 +4,7 @@ <refentry id="function.round"> <refnamediv> <refname>round</refname> - <refpurpose>Arrondi.</refpurpose> + <refpurpose>Arrondi</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -30,15 +30,21 @@ </caution> </para> <para> - <informalexample> + <example> + <title>Exemple avec <function>round</function></title> <programlisting role="php"> -&lt;?php - $foo = round( 3.4 ); // $foo == 3.0 - $foo = round( 3.5 ); // $foo == 4.0 - $foo = round( 3.6 ); // $foo == 4.0 -?&gt; +<![CDATA[ +<?php +echo round(3.4); // 3 +echo round(3.5); // 4 +echo round(3.6); // 4 +echo round(3.6, 0); // 4 +echo round(1.95583, 2); // 1.96 +echo round(1241757, -3); // 1242000 +?> +]]> </programlisting> - </informalexample> + </example> </para> <note> <simpara> Index: phpdoc-fr/reference/math/functions/sin.xml diff -u phpdoc-fr/reference/math/functions/sin.xml:1.1 phpdoc-fr/reference/math/functions/sin.xml:1.2 --- phpdoc-fr/reference/math/functions/sin.xml:1.1 Sun Apr 14 20:32:08 2002 +++ phpdoc-fr/reference/math/functions/sin.xml Sun Jun 29 11:10:24 2003 @@ -3,7 +3,7 @@ <!-- last change to 'sin' in en/ tree in rev 1.2 --> <refentry id="function.sin"> <refnamediv> - <refname>Sin</refname> + <refname>sin</refname> <refpurpose>Sinus</refpurpose> </refnamediv> <refsect1> @@ -16,11 +16,29 @@ <function>sin</function> retourne le sinus de <parameter>arg</parameter> (<parameter>arg</parameter> in radians). </para> - <para> - Voir aussi - <function>cos</function> et - <function>tan</function>. - </para> + <para> + <example> + <title>Exemple avec <function>sin</function></title> + <programlisting> +<![CDATA[ +<?php + +// La pr&eacute;cision d&eacute;pend de la directive precision +print sin(deg2rad(60)); // 0.866025403 ... +print sin(60); // -0.304810621 ... + +?> +]]> + </programlisting> + </example> + </para> + <para> + Voir aussi + <function>asin</function>, + <function>cos</function>, + <function>tan</function> et + <function>deg2rad</function>. + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/sqrt.xml diff -u phpdoc-fr/reference/math/functions/sqrt.xml:1.1 phpdoc-fr/reference/math/functions/sqrt.xml:1.2 --- phpdoc-fr/reference/math/functions/sqrt.xml:1.1 Sun Apr 14 20:32:10 2002 +++ phpdoc-fr/reference/math/functions/sqrt.xml Sun Jun 29 11:10:24 2003 @@ -3,8 +3,8 @@ <!-- last change to 'sqrt' in en/ tree in rev 1.2 --> <refentry id="function.sqrt"> <refnamediv> - <refname>Sqrt</refname> - <refpurpose>Racine carr&eacute;e.</refpurpose> + <refname>sqrt</refname> + <refpurpose>Racine carr&eacute;e</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -16,6 +16,24 @@ <function>sqrt</function> retourne la racine carr&eacute;e de <parameter>arg</parameter>. </para> + <para> + <example> + <title>Exemple avec <function>sqrt</function></title> + <programlisting> +<![CDATA[ +<?php + // La pr&eacute;cision d&eacute;pend de votre directive precision + echo sqrt(9); // 3 + echo sqrt(10); // 3.16227766 ... +?> +]]> + </programlisting> + </example> + </para> + <para> + Voir aussi + <function>pow</function>. + </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/functions/srand.xml diff -u phpdoc-fr/reference/math/functions/srand.xml:1.1 phpdoc-fr/reference/math/functions/srand.xml:1.2 --- phpdoc-fr/reference/math/functions/srand.xml:1.1 Sun Apr 14 20:32:10 2002 +++ phpdoc-fr/reference/math/functions/srand.xml Sun Jun 29 11:10:24 2003 @@ -15,16 +15,22 @@ <para> <function>srand</function> initialise le g&eacute;n&eacute;rateur de nombres al&eacute;atoires avec <parameter>seed</parameter>. - <informalexample> + <example> + <title>Exemple avec <function>srand</function></title> <programlisting role="php"> -&lt;?php -// initialise avec les microsecondes depuis la derni&egrave;re seconde enti&egrave;re - srand((float) microtime()*1000000); - $randval = rand(); -?&gt; +<![CDATA[ +// initialise avec les microsecondes +function make_seed() { + list($usec, $sec) = explode(' ', microtime()); + return (float) $sec + ((float) $usec * 100000); +} +srand(make_seed()); +$randval = rand(); +]]> </programlisting> - </informalexample> + </example> </para> + &note.randomseed; <simpara> Voir aussi <function>rand</function>, Index: phpdoc-fr/reference/math/functions/tan.xml diff -u phpdoc-fr/reference/math/functions/tan.xml:1.1 phpdoc-fr/reference/math/functions/tan.xml:1.2 --- phpdoc-fr/reference/math/functions/tan.xml:1.1 Sun Apr 14 20:32:10 2002 +++ phpdoc-fr/reference/math/functions/tan.xml Sun Jun 29 11:10:24 2003 @@ -3,7 +3,7 @@ <!-- last change to 'tan' in en/ tree in rev 1.57 --> <refentry id="function.tan"> <refnamediv> - <refname>Tan</refname> + <refname>tan</refname> <refpurpose>Tangente</refpurpose> </refnamediv> <refsect1> @@ -18,8 +18,10 @@ </para> <para> Voir aussi - <function>sin</function> et - <function>cos</function>. + <function>atan</function>, + <function>sin</function>, + <function>cos</function> et + <function>deg2rad</function>. </para> </refsect1> </refentry> Index: phpdoc-fr/reference/math/constants.xml +++ phpdoc-fr/reference/math/constants.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <section id="math.constants"> &reftitle.constants; &extension.constants.core; <para> <table> <title>constantes math&eacute;matiques</title> <tgroup cols="3"> <thead> <row> <entry>Constante</entry> <entry>Valeur</entry> <entry>Description</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>Euler constant [4.0.2]</entry> </row> </tbody> </tgroup> </table> Seule M_PI est disponible dans les verisons de PHP jusqu'&agrave; 4.0.0. Toutes les autres constantes on &eacute;t&eacute; ajout&eacute;s &agrave; partir de PHP 4.0.0, et les autres ont &eacute;t&eacute; indiqu&eacute;es avec [4.0.2]. </para> </section> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-fr/reference/math/functions/expm1.xml +++ phpdoc-fr/reference/math/functions/expm1.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/math.xml, last change in rev 1.63 --> <refentry id="function.expm1"> <refnamediv> <refname>expm1</refname> <refpurpose> Retourne le r&eacute;sultat de exp(number) - 1, calcul&eacute; de mani&egrave;re pr&eacute;cise, m&ecirc;me si val est proche de 0 </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>float</type><methodname>expm1</methodname> <methodparam><type>float</type><parameter>number</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-fr/reference/math/functions/fmod.xml +++ phpdoc-fr/reference/math/functions/fmod.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.fmod"> <refnamediv> <refname>fmod</refname> <refpurpose> Retourne le reste de la division </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>float</type><methodname>fmod</methodname> <methodparam><type>float</type><parameter>x</parameter></methodparam> <methodparam><type>float</type><parameter>y</parameter></methodparam> </methodsynopsis> <para> <methodname>fmod</methodname> retourne le reste de la division de (<parameter>x</parameter>) par (<parameter>y</parameter>). Ce reste est un nombre &agrave; virgule flottante. Le reste est d&eacute;fini par : x = i * y + r, pour un entier <varname>i</varname>. Si <parameter>y</parameter> n'est pas nul, <varname>r</varname> a le m&ecirc;me signe que <parameter>x</parameter> est une taille inf&eacute;rieure &agrave; <parameter>y</parameter>. </para> <example> <title>Exemple avec <function>fmod</function></title> <programlisting role="php"> <![CDATA[ $x = 5.7; $y = 1.3; $r = fmod($x, $y); // $r &eacute;gale 0.5, car 4 * 1.3 + 0.5 = 5.7 ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-fr/reference/math/functions/hypot.xml +++ phpdoc-fr/reference/math/functions/hypot.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/math.xml, last change in rev 1.72 --> <refentry id="function.hypot"> <refnamediv> <refname>hypot</refname> <refpurpose> Retourne le r&eacute;sultat de sqrt( num1*num1 + num2*num2) </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>float</type><methodname>hypot</methodname> <methodparam><type>float</type><parameter>num1</parameter></methodparam> <methodparam><type>float</type><parameter>num2</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-fr/reference/math/functions/is-finite.xml +++ phpdoc-fr/reference/math/functions/is-finite.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/math.xml, last change in rev 1.72 --> <refentry id="function.is-finite"> <refnamediv> <refname>is_finite</refname> <refpurpose>Indique si un nombre est fini</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>is_finite</methodname> <methodparam><type>float</type><parameter>val</parameter></methodparam> </methodsynopsis> <para> <function>is_finite</function> retourne &true; si <parameter>val</parameter> est une valeur finie, c'est &agrave; dire une valeur qui peut &ecirc;tre repr&eacute;sent&eacute;e par un nombre &agrave; virgule flottante sur cette plate-forme. </para> <para> Voir aussi <function>is_infinite</function> et <function>is_nan</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-fr/reference/math/functions/is-infinite.xml +++ phpdoc-fr/reference/math/functions/is-infinite.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/math.xml, last change in rev 1.72 --> <refentry id="function.is-infinite"> <refnamediv> <refname>is_infinite</refname> <refpurpose> </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>is_infinite</methodname> <methodparam><type>float</type><parameter>val</parameter></methodparam> </methodsynopsis> <para> <methodname>is_infinite</methodname> &true; si <parameter>val</parameter> est infini (positif ou n&eacute;gatif), comme par exemple le r&eacute;sultat de <literal>log(0)</literal> ou une valeur qui est trop grande pour &ecirc;tre repr&eacute;sent&eacute; par un nombre &agrave; virgule flottante sur cette plate-forme. </para> <para> Voir aussi <function>is_finite</function> et <function>is_nan</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-fr/reference/math/functions/is-nan.xml +++ phpdoc-fr/reference/math/functions/is-nan.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/math.xml, last change in rev 1.63 --> <refentry id="function.is-nan"> <refnamediv> <refname>is_nan</refname> <refpurpose>Indique si une valeur est un nombre</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>is_nan</methodname> <methodparam><type>float</type><parameter>val</parameter></methodparam> </methodsynopsis> <para> <function>is_nan</function> retourne &true; si <parameter>val</parameter> n'est pas un nombre, comme par exemple, le r&eacute;sultat de <literal>acos(1.01)</literal>. </para> <para> Voir aussi <function>is_finite</function> et <function>is_infinite</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-fr/reference/math/functions/log1p.xml +++ phpdoc-fr/reference/math/functions/log1p.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/math.xml, last change in rev 1.63 --> <refentry id="function.log1p"> <refnamediv> <refname>log1p</refname> <refpurpose> Retourne le r&eacute;sultat de log(1 + number), calcul&eacute; de mani&egrave;re pr&eacute;cise, m&ecirc;me si val est proche de z&eacute;ro. </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>float</type><methodname>log1p</methodname> <methodparam><type>float</type><parameter>number</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.doc.fr (#574) next »