note 107539 deleted from function.sqrt by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 15:37:46 +0000 |
| Subject: | note 107539 deleted from function.sqrt by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189883@lists.php.net to get a copy of this message | ||
Note Submitter: Husoski
----
This is interesting. The "xth square root" idea is being used by a couple different
posters, but it's not a root at all. It the logarithm, base x. In the posted code, it's
rounded down to the next smaller or equal integer, but it's still a logarithm.
The full exact value as a float can be computed with log(value)/log(x). No loops needed.
For true xth roots, use pow(value, 1.0/x). That gives you the number that produces (value) when
raised to the x power.