Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 2288

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>pow</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Mathematical Functions"
HREF="ref.math.html"><LINK
REL="PREVIOUS"
TITLE="pi"
HREF="function.pi.html"><LINK
REL="NEXT"
TITLE="rad2deg"
HREF="function.rad2deg.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.pi.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.rad2deg.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.pow"
></A
>pow</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN45117"
></A
><P
>    (PHP 3, PHP 4 )</P
>pow&nbsp;--&nbsp;Exponential expression</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN45120"
></A
><H2
>Description</H2
>number <B
CLASS="methodname"
>pow</B
> ( number base, number exp)<BR
></BR
><P
>&#13;     Returns <TT
CLASS="parameter"
><I
>base</I
></TT
> raised to the power of 
     <TT
CLASS="parameter"
><I
>exp</I
></TT
>. If possible, this function will
     return an <A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>.
    </P
><P
>&#13;     If the power cannot be computed, a warning will be issued,
     and <B
CLASS="function"
>pow()</B
> will return <TT
CLASS="constant"
><B
>FALSE</B
></TT
>.
    </P
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN45138"
></A
><P
><B
>Example 1. Some examples of <B
CLASS="function"
>pow()</B
></B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;?php

var_dump( pow(2,8) ); // int(256)
echo pow(-1,20); // 1
echo pow(0, 0); // 1

echo pow(-1, 5.5); // error

?&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
BORDER="1"
WIDTH="100%"
><TR
><TD
ALIGN="CENTER"
><B
>Warning</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
>&#13;      In PHP 4.0.6 and earlier <B
CLASS="function"
>pow()</B
> always returned
      a <A
HREF="language.types.float.html"
><B
CLASS="type"
>float</B
></A
>, and did not issue warnings.
     </P
></TD
></TR
></TABLE
></DIV
><P
> 
     See also <A
HREF="function.exp.html"
><B
CLASS="function"
>exp()</B
></A
> and <A
HREF="function.sqrt.html"
><B
CLASS="function"
>sqrt()</B
></A
>.
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.pi.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.rad2deg.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>pi</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.math.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>rad2deg</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>