<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Matemática e Trigonometria</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="Referência das Funções" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="mailparse_uudecode_all" HREF="function.mailparse-uudecode-all.html"><LINK REL="NEXT" TITLE="abs" HREF="function.abs.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" 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" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.mailparse-uudecode-all.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.abs.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.math" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >LXXXI. Matemática e Trigonometria</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN104208" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="math.intro" >Introdução</A ></H1 ><P > Estas funções matemáticas somente suportam valores dentro do tamanho <A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A > and <A HREF="language.types.float.html" ><B CLASS="type" >float</B ></A > do seu computador. (estes correspondem atualmente aos tipos do C long e double) Se você precisa manipular números maiores, procure <A HREF="ref.bc.html" >funções de matemática com precisão arbitrária</A >. </P ><P > Veja também a seção do manual sobre <A HREF="language.operators.arithmetic.html" >operadores aritméticos</A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="math.requirements" >Dependências</A ></H1 ><P >Nenhuma biblioteca externa é necessária para compilar esta extensão.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="math.installation" >Instalação</A ></H1 ><P >Não há nenhuma instalação necessária para utilizar estas funções, elas fazem parte do núcleo do PHP.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="math.configuration" >Configurações em execução</A ></H1 ><P >Esta extensão não define nenhum parâmetro de configuração no <TT CLASS="filename" >php.ini</TT >.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="math.resources" >Tipos Resource</A ></H1 ><P >Esta extensão não possui nenhum tipo resource.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="math.constants" >Constantes pré-definidas</A ></H1 ><P > As constantes listadas abaixo estão sempre disponíveis como parte do núcleo do PHP. </P ><P > <DIV CLASS="table" ><A NAME="AEN104234" ></A ><P ><B >Tabela 1. Constantes matemáticas</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><COL><THEAD ><TR ><TH >Constante</TH ><TH >Valor</TH ><TH >Descrição</TH ></TR ></THEAD ><TBODY ><TR ><TD >M_PI</TD ><TD >3.14159265358979323846</TD ><TD >Pi</TD ></TR ><TR ><TD >M_E</TD ><TD >2.7182818284590452354</TD ><TD >e</TD ></TR ><TR ><TD >M_LOG2E</TD ><TD >1.4426950408889634074</TD ><TD >log_2 e</TD ></TR ><TR ><TD >M_LOG10E</TD ><TD >0.43429448190325182765</TD ><TD >log_10 e</TD ></TR ><TR ><TD >M_LN2</TD ><TD >0.69314718055994530942</TD ><TD >log_e 2</TD ></TR ><TR ><TD >M_LN10</TD ><TD >2.30258509299404568402</TD ><TD >log_e 10</TD ></TR ><TR ><TD >M_PI_2</TD ><TD >1.57079632679489661923</TD ><TD >pi/2</TD ></TR ><TR ><TD >M_PI_4</TD ><TD >0.78539816339744830962</TD ><TD >pi/4</TD ></TR ><TR ><TD >M_1_PI</TD ><TD >0.31830988618379067154</TD ><TD >1/pi</TD ></TR ><TR ><TD >M_2_PI</TD ><TD >0.63661977236758134308</TD ><TD >2/pi</TD ></TR ><TR ><TD >M_SQRTPI</TD ><TD >1.77245385090551602729</TD ><TD >raiz_quadrada(pi) [4.0.2]</TD ></TR ><TR ><TD >M_2_SQRTPI</TD ><TD >1.12837916709551257390</TD ><TD >2/raiz_quadrada(pi)</TD ></TR ><TR ><TD >M_SQRT2</TD ><TD >1.41421356237309504880</TD ><TD >raiz_quadrada(2)</TD ></TR ><TR ><TD >M_SQRT3</TD ><TD >1.73205080756887729352</TD ><TD >raiz_quadrada(3) [4.0.2]</TD ></TR ><TR ><TD >M_SQRT1_2</TD ><TD >0.70710678118654752440</TD ><TD >1/raiz_quadrada(2)</TD ></TR ><TR ><TD >M_LNPI</TD ><TD >1.14472988584940017414</TD ><TD >log_e(pi) [4.0.2]</TD ></TR ><TR ><TD >M_EULER</TD ><TD >0.57721566490153286061</TD ><TD >Constante de Euler [4.0.2]</TD ></TR ></TBODY ></TABLE ></DIV > Somente M_PI está disponível nas versões do PHP anteriores a 4.0.0, inclusive. Todas as outras constantes foram disponibilizadas a partir da 4.0.0. Constantes marcadas com [4.0.2] foram acrescentadas no PHP 4.0.2. </P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Índice</B ></DT ><DT ><A HREF="function.abs.html" >abs</A > -- Valor absoluto</DT ><DT ><A HREF="function.acos.html" >acos</A > -- Cosseno Inverso (arco cosseno)</DT ><DT ><A HREF="function.acosh.html" >acosh</A > -- Coseno Hiperbólico Inverso</DT ><DT ><A HREF="function.asin.html" >asin</A > -- Seno Inverso (arco seno)</DT ><DT ><A HREF="function.asinh.html" >asinh</A > -- Seno Hiperbólico Inverso</DT ><DT ><A HREF="function.atan2.html" >atan2</A > -- Tangente inversa de duas variáveis</DT ><DT ><A HREF="function.atan.html" >atan</A > -- Tangente Inversa (arco tangente)</DT ><DT ><A HREF="function.atanh.html" >atanh</A > -- Tangente hiperbólica inversa</DT ><DT ><A HREF="function.base-convert.html" >base_convert</A > -- Converte um número entre bases arbitrárias</DT ><DT ><A HREF="function.bindec.html" >bindec</A > -- Binário para decimal</DT ><DT ><A HREF="function.ceil.html" >ceil</A > -- Arredonda frações para cima</DT ><DT ><A HREF="function.cos.html" >cos</A > -- Coseno</DT ><DT ><A HREF="function.cosh.html" >cosh</A > -- Coseno hiperbólico</DT ><DT ><A HREF="function.decbin.html" >decbin</A > -- Decimal para binário</DT ><DT ><A HREF="function.dechex.html" >dechex</A > -- Decimal para hexadecimal</DT ><DT ><A HREF="function.decoct.html" >decoct</A > -- Decimal para octal</DT ><DT ><A HREF="function.deg2rad.html" >deg2rad</A > -- Converte o número em graus ao equivalente em radianos </DT ><DT ><A HREF="function.exp.html" >exp</A > -- Calcula o expoente de <TT CLASS="constant" ><B >e</B ></TT > (Neperiano ou base logarítmica natural)</DT ><DT ><A HREF="function.expm1.html" >expm1</A > -- Retorna exp(numero) - 1, computado de forma que é preciso mesmo quando o valor do número é perto de zero. </DT ><DT ><A HREF="function.floor.html" >floor</A > -- Arredonda frações para baixo</DT ><DT ><A HREF="function.fmod.html" >fmod</A > -- Returns the floating point remainder (modulo) of the division of the arguments</DT ><DT ><A HREF="function.getrandmax.html" >getrandmax</A > -- Retorna o maior valor aletório possível</DT ><DT ><A HREF="function.hexdec.html" >hexdec</A > -- Hexadecimal para decimal</DT ><DT ><A HREF="function.hypot.html" >hypot</A > -- Retorna a raiz quadrada de (num1*num1 + num2*num2) </DT ><DT ><A HREF="function.is-finite.html" >is_finite</A > -- </DT ><DT ><A HREF="function.is-infinite.html" >is_infinite</A > -- </DT ><DT ><A HREF="function.is-nan.html" >is_nan</A > -- </DT ><DT ><A HREF="function.lcg-value.html" >lcg_value</A > -- Gerador congruente linear combinado</DT ><DT ><A HREF="function.log10.html" >log10</A > -- Logaritmo Base 10</DT ><DT ><A HREF="function.log1p.html" >log1p</A > -- Retorna o log(1 + numero), calculado de forma que o valor do número seja próximo de zero. </DT ><DT ><A HREF="function.log.html" >log</A > -- Logaritmo natural</DT ><DT ><A HREF="function.max.html" >max</A > -- Localiza o maior número</DT ><DT ><A HREF="function.min.html" >min</A > -- Localiza o menor número</DT ><DT ><A HREF="function.mt-getrandmax.html" >mt_getrandmax</A > -- Retorna o maior valor aletório possível</DT ><DT ><A HREF="function.mt-rand.html" >mt_rand</A > -- Gerador melhorado de números aleatórios</DT ><DT ><A HREF="function.mt-srand.html" >mt_srand</A > -- Semeia o gerador melhorado de números aleatórios</DT ><DT ><A HREF="function.octdec.html" >octdec</A > -- Octal para decimal</DT ><DT ><A HREF="function.pi.html" >pi</A > -- Obtêm o valor de pi</DT ><DT ><A HREF="function.pow.html" >pow</A > -- Potência</DT ><DT ><A HREF="function.rad2deg.html" >rad2deg</A > -- Converte o número em radianos para o equivalente em graus </DT ><DT ><A HREF="function.rand.html" >rand</A > -- Gera um número aleatório</DT ><DT ><A HREF="function.round.html" >round</A > -- Arredonda um número</DT ><DT ><A HREF="function.sin.html" >sin</A > -- Seno</DT ><DT ><A HREF="function.sinh.html" >sinh</A > -- Seno hiperbólico</DT ><DT ><A HREF="function.sqrt.html" >sqrt</A > -- Raiz quadrada</DT ><DT ><A HREF="function.srand.html" >srand</A > -- Semeia o gerador de números aletórios</DT ><DT ><A HREF="function.tan.html" >tan</A > -- Tangente</DT ><DT ><A HREF="function.tanh.html" >tanh</A > -- Tangente hiperbólica</DT ></DL ></DIV ></DIV ></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.mailparse-uudecode-all.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.abs.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >mailparse_uudecode_all</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >abs</TD ></TR ></TABLE ></DIV ></BODY ></HTML >