mirror of
https://github.com/php/doc-it.git
synced 2026-03-24 07:32:12 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@314550 c90b9560-bf6c-de11-be94-00142212c4b1
58 lines
1.6 KiB
XML
58 lines
1.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- EN-Revision: n/a Maintainer: cortesi Status: ready -->
|
|
<refentry xml:id="function.pi" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>pi</refname>
|
|
<refpurpose>Restituisce il valore di pi</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descrizione</title>
|
|
<methodsynopsis>
|
|
<type>double</type><methodname>pi</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
Restituisce una appossimazione di pi. Il valore restituito è un <type>float</type>
|
|
e ha precisione secondo la
|
|
direttiva <link linkend="ini.precision">precision</link> del file
|
|
&php.ini;, che ha come valore predefinito <literal>14</literal>.
|
|
Inoltre, si può usare la costante <constant>M_PI</constant> che permette di ottenere
|
|
risultati identici all'uso di <function>pi</function>.
|
|
</simpara>
|
|
<para>
|
|
<example>
|
|
<title>Esempio di uso di <function>pi</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
echo pi(); // 3.1415926535898
|
|
echo M_PI; // 3.1415926535898
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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:"~/.phpdoc/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
|
|
-->
|