note 93921 deleted from function.sqrt by danbrown
| From: | danbrown@php.net | Date: | Wed, 07 Oct 2009 07:47:55 +0000 |
| Subject: | note 93921 deleted from function.sqrt by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-161435@lists.php.net to get a copy of this message | ||
Note Submitter: Christopher Kramer
----
I think the function "xsqrt" posted below is unnecessary because pow() does the trick like
"jouhni at web dot de" already noted.
For comfort reasons, you could define it like this:
<?php
function root($n, $value) {
return pow($value, 1/$n);
}
?>
And I would not call this "xsqrt", because "square root" means that the base is
2, not x. I'd call it "root" ;)