-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
117 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<refentry xml:id="function.fpow" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>fpow</refname> | ||
<refpurpose>Raise one number to the power of another, according to IEEE 754</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type>float</type><methodname>fpow</methodname> | ||
<methodparam><type>float</type><parameter>num1</parameter></methodparam> | ||
<methodparam><type>float</type><parameter>num2</parameter></methodparam> | ||
</methodsynopsis> | ||
<simpara> | ||
Returns the floating point result of raising | ||
<parameter>num1</parameter> to the power of <parameter>num2</parameter>. | ||
If <parameter>num1</parameter> is zero and <parameter>num2</parameter> | ||
is less than zero, then <constant>INF</constant> is returned. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<simpara> | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>num1</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The base to number. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>num2</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The exponent. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
Returns a <type>float</type> corresponding to | ||
<literal><parameter>num1</parameter><superscript><parameter>num2</parameter></superscript></literal>. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="examples"> | ||
&reftitle.examples; | ||
<example xml:id="function.fpow.example.basic"> | ||
<title><function>fpow</function> example</title> | ||
<simpara> | ||
Description. | ||
</simpara> | ||
<programlisting role="php"> | ||
<![CDATA[ | ||
<?php | ||
var_dump(fpow(0, -3)); | ||
var_dump(fpow(-1, 5.5)); | ||
?> | ||
]]> | ||
</programlisting> | ||
&example.outputs; | ||
<screen> | ||
<![CDATA[ | ||
float(INF) | ||
float(NAN) | ||
]]> | ||
</screen> | ||
</example> | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<simplelist> | ||
<member><link linkend="language.operators.arithmetic"><literal>/</literal></link> - Floating-point division</member> | ||
<member><function>pow</function></member> | ||
<member><function>fdiv</function></member> | ||
<member><function>fmod</function></member> | ||
<!-- TODO ** operator link? | ||
<member><link linkend="some.id.chunk.to.link">something appendix</link></member> | ||
--> | ||
</simplelist> | ||
</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 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters