Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: gmp_sqrtrem - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

gmp_strval" width="11" height="7"/> <gmp_sqrt
Last updated: Mon, 05 Feb 2007

view this page in

gmp_sqrtrem

(PHP 4 >= 4.0.4, PHP 5)

gmp_sqrtrem — 余りつきの平方根

説明

array gmp_sqrtrem ( resource a )

最初の要素が a の整数平方根 (gmp_sqrt()も参照ください)、2 番目の要素が 余り(すなわち、a と最初の要素の 2 乗の差) であるような配列を返します。

例 759. gmp_sqrtrem() の例

<?php
list($sqrt1, $sqrt1rem) = gmp_sqrtrem("9");
list(
$sqrt2, $sqrt2rem) = gmp_sqrtrem("7");
list(
$sqrt3, $sqrt3rem) = gmp_sqrtrem("1048576");

echo
gmp_strval($sqrt1) . ", " . gmp_strval($sqrt1rem) . "\n";   
echo
gmp_strval($sqrt2) . ", " . gmp_strval($sqrt2rem) . "\n";   
echo
gmp_strval($sqrt3) . ", " . gmp_strval($sqrt3rem) . "\n";   
?>

上のプログラムの出力は次のようになります。


3, 0
2, 3
1024, 0

     



add a note add a note User Contributed Notes
gmp_sqrtrem
There are no user contributed notes for this page.

gmp_strval" width="11" height="7"/> <gmp_sqrt
Last updated: Mon, 05 Feb 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites