mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 13:57:03 +08:00
92 lines
3.3 KiB
HTML
92 lines
3.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<title>任意精度数字的二次方根</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.bcsqrt" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">bcsqrt</h1>
|
||
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">bcsqrt</span> — <span class="dc-title">任意精度数字的二次方根</span></p>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 description" id="refsect1-function.bcsqrt-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>bcsqrt</strong></span>
|
||
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$operand</code></span>
|
||
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$scale</code></span>
|
||
] ) : <span class="type">string</span></div>
|
||
|
||
<p class="para rdfs-comment">
|
||
返回<code class="parameter">操作数</code>的二次方根.
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 parameters" id="refsect1-function.bcsqrt-parameters">
|
||
<h3 class="title">参数</h3>
|
||
<p class="para">
|
||
<dl>
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">operand</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
字符串类型的操作数.
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">
|
||
scale</code></dt>
|
||
<dd>
|
||
<p class="para">此可选参数用于设置结果中小数点后的小数位数。也可通过使用
|
||
<span class="function"><a href="bcscale.html" class="function">bcscale()</a></span> 来设置全局默认的小数位数,用于所有函数。
|
||
</p></dd>
|
||
|
||
</dl>
|
||
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.bcsqrt-returnvalues">
|
||
<h3 class="title">返回值</h3>
|
||
<p class="para">
|
||
返回二次方根的结果为字符串类型,如果操作数是负数则返回null.
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 examples" id="refsect1-function.bcsqrt-examples">
|
||
<h3 class="title">范例</h3>
|
||
<div class="example" id="example-4059">
|
||
<p><strong>Example #1 <span class="function"><strong>bcsqrt()</strong></span> 示例</strong></p>
|
||
<div class="example-contents">
|
||
<div class="phpcode"><pre><span style="color: #000000">
|
||
<span style="color: #0000BB"><?php<br /><br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">bcsqrt</span><span style="color: #007700">(</span><span style="color: #DD0000">'2'</span><span style="color: #007700">, </span><span style="color: #0000BB">3</span><span style="color: #007700">); </span><span style="color: #FF8000">// 1.414<br /><br /></span><span style="color: #0000BB">?></span>
|
||
</span>
|
||
</pre></div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 seealso" id="refsect1-function.bcsqrt-seealso">
|
||
<h3 class="title">参见</h3>
|
||
<p class="para">
|
||
<ul class="simplelist">
|
||
<li class="member"><span class="function"><a href="bcpow.html" class="function" rel="rdfs-seeAlso">bcpow()</a> - 任意精度数字的乘方</span></li>
|
||
</ul>
|
||
</p>
|
||
</div>
|
||
|
||
</div></div></div></body></html> |