note 44390 deleted from function.sqrt by mazzanet
| From: | mazzanet@php.net | Date: | Fri, 08 Jul 2005 07:20:19 +0000 |
| Subject: | note 44390 deleted from function.sqrt by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91635@lists.php.net to get a copy of this message | ||
Note Submitter: php at primezero dot com
----
this little script allows you to find a whole lotta square roots...
<?
# initial value
$i = 0;
#set any limit you want, well, almost any...
$setSomeLimit = 10000;
# do it! .... do it!
do {
# find the square root
$sqRoot = sqrt($i);
# not a decimal? that it is a perfect square! ^_^
if ( ereg ("^[0-9]{1,12}$", $sqRoot)) {
# suppose that the_square_root = teh_square_root
print "<br>teh_square_root is of $i is $sqRoot";
}
$i++; # next!!
# keeps running until it reaches the limit
} while ($i < $setSomeLimit);
# author: guru clockwise
# website: primezero.com
?>