note 107539 added to function.sqrt

From: Date: Thu, 16 Feb 2012 11:04:45 +0000
Subject: note 107539 added to function.sqrt
Groups: php.notes 
Request: Send a blank email to php-notes+get-186162@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 68.4.39.97 ---- Manual Page -- http://www.php.net/manual/en/function.sqrt.php Edit -- https://master.php.net/note/edit/107539 Del: integrated -- https://master.php.net/note/delete/107539/integrated Del: useless -- https://master.php.net/note/delete/107539/useless Del: bad code -- https://master.php.net/note/delete/107539/bad+code Del: spam -- https://master.php.net/note/delete/107539/spam Del: non-english -- https://master.php.net/note/delete/107539/non-english Del: in docs -- https://master.php.net/note/delete/107539/in+docs Del: other reasons-- https://master.php.net/note/delete/107539 Reject -- https://master.php.net/note/reject/107539 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186162) next »