Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 12110

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>BC math 高精度数学函数</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="函数参考"
HREF="funcref.html"><LINK
REL="PREVIOUS"
TITLE="aspell_suggest"
HREF="function.aspell-suggest.html"><LINK
REL="NEXT"
TITLE="bcadd"
HREF="function.bcadd.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"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.aspell-suggest.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.bcadd.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="reference"
><A
NAME="ref.bc"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
>VII. BC math 高精度数学函数</H1
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN13941"
></A
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="bc.intro"
>简介</A
></H1
><P
>&#13;    PHP 为任意精度数学计算提供了二进制计算器(Binary
    Calculator),它支持任意大小和精度的数字,以字符串形式描述。
   </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="bc.requirements"
>需求</A
></H1
><P
>&#13;    自 PHP 4.0.4 以来,libbcmath 都绑定在 PHP 内部。本扩展不需要其它外部库的支持。
   </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="bc.installation"
>安装</A
></H1
><P
>&#13;  本类函数仅在 PHP 编译时配置了
  <CODE
CLASS="option"
>--enable-bcmath</CODE
>
  时可用。在 PHP 3 中,本类函数仅在 PHP
  编译时<SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>没有</I
></SPAN
>配置
  <CODE
CLASS="option"
>--disable-bcmath</CODE
> 时可用。
 </P
><P
> <TT
CLASS="literal"
>PHP</TT
> 的 Windows
版本已经内置该扩展模块的支持。无需加载任何附加扩展库即可使用这些函数。</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="bc.configuration"
>运行时配置</A
></H1
><P
>这些函数的行为受 <TT
CLASS="filename"
>php.ini</TT
> 的影响。</P
><P
>&#13; <DIV
CLASS="table"
><A
NAME="AEN13961"
></A
><P
><B
>表 1. BC 数学库配置选项</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><COL><COL><THEAD
><TR
><TH
>名称</TH
><TH
>默认值</TH
><TH
>可修改范围</TH
><TH
>更新记录</TH
></TR
></THEAD
><TBODY
><TR
><TD
>bcmath.scale</TD
><TD
>"0"</TD
><TD
>PHP_INI_ALL</TD
><TD
>&nbsp;</TD
></TR
></TBODY
></TABLE
></DIV
>
  有关 PHP_INI_* 常量进一步的细节与定义参见<A
HREF="ini.html"
>附录 H</A
>。
 </P
><P
>以下是配置选项的简要解释。</P
><P
>&#13;  <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><A
NAME="ini.bcmath.scale"
></A
><CODE
CLASS="parameter"
>bcmath.scale</CODE
>
     <A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
></DT
><DD
><P
>&#13;      所有 bcmath 函数中十进制数字的数目。参见
      <A
HREF="function.bcscale.html"
><B
CLASS="function"
>bcscale()</B
></A
>。
     </P
></DD
></DL
></DIV
>
 </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="bc.resources"
>资源类型</A
></H1
><P
>本扩展模块未定义任何资源类型。</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="bc.constants"
>预定义常量</A
></H1
><P
>本扩展模块未定义任何常量。</P
></DIV
></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>目录</B
></DT
><DT
><A
HREF="function.bcadd.html"
>bcadd</A
>&nbsp;--&nbsp;Add two arbitrary precision numbers</DT
><DT
><A
HREF="function.bccomp.html"
>bccomp</A
>&nbsp;--&nbsp;Compare two arbitrary precision numbers</DT
><DT
><A
HREF="function.bcdiv.html"
>bcdiv</A
>&nbsp;--&nbsp;Divide two arbitrary precision numbers</DT
><DT
><A
HREF="function.bcmod.html"
>bcmod</A
>&nbsp;--&nbsp;Get modulus of an arbitrary precision number</DT
><DT
><A
HREF="function.bcmul.html"
>bcmul</A
>&nbsp;--&nbsp;Multiply two arbitrary precision number</DT
><DT
><A
HREF="function.bcpow.html"
>bcpow</A
>&nbsp;--&nbsp;Raise an arbitrary precision number to another</DT
><DT
><A
HREF="function.bcpowmod.html"
>bcpowmod</A
>&nbsp;--&nbsp;Raise an arbitrary precision number to another, reduced by a specified modulus</DT
><DT
><A
HREF="function.bcscale.html"
>bcscale</A
>&nbsp;--&nbsp;Set default scale parameter for all bc math functions</DT
><DT
><A
HREF="function.bcsqrt.html"
>bcsqrt</A
>&nbsp;--&nbsp;Get the square root of an arbitrary precision number</DT
><DT
><A
HREF="function.bcsub.html"
>bcsub</A
>&nbsp;--&nbsp;Subtract one arbitrary precision number from another</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.aspell-suggest.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.bcadd.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>aspell_suggest</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="funcref.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>bcadd</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>