note 128160 added to function.pow
| From: | Jan at main dot php dot net | Date: | Sun, 29 Jan 2023 15:34:07 +0000 |
| Subject: | note 128160 added to function.pow | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220116@lists.php.net to get a copy of this message | ||
function myPow($base, $exp)
{
$myPow=1;
for($i=0; $i <= abs($exp); $i++)
{
$myPow = $myPow * $base;
}
if ($exp < 0)
{
$myPow = 1/$myPow;
}
return $myPow;
}
// Test der Funktion
$myPow = myPow($base, $exp); // aufruf der Fuktion
echo "<p>$base^$exp = $myPow</p>";
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.158.213 (proxied: 81.26.172.226)
----
Manual Page -- https://php.net/manual/en/function.pow.php
Edit -- https://main.php.net/note/edit/128160
Del: integrated -- https://main.php.net/note/delete/128160/integrated
Del: useless -- https://main.php.net/note/delete/128160/useless
Del: bad code -- https://main.php.net/note/delete/128160/bad+code
Del: spam -- https://main.php.net/note/delete/128160/spam
Del: non-english -- https://main.php.net/note/delete/128160/non-english
Del: in docs -- https://main.php.net/note/delete/128160/in+docs
Del: other reasons-- https://main.php.net/note/delete/128160
Reject -- https://main.php.net/note/reject/128160
Search -- https://main.php.net/manage/user-notes.php