note 34193 deleted from function.pow by hholzgra

From: Date: Thu, 02 Aug 2012 15:29:28 +0000
Subject: note 34193 deleted from function.pow by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-189862@lists.php.net to get a copy of this message
Note Submitter: bishop ---- A couple of points on pow(): 1. One of the official examples of pow(2,8) is not pragmatic; use 1 << 8 as it's substantially faster 2. When passing variables to pow(), cast them otherwise you might get warnings on some versions of PHP 3. All the rules of algebra apply: b**(-e) is 1/(b**e), b**(p/q) is the qth root of b**p So, e.g., sqrt($x) === pow($x, .5); but sqrt() is faster.

« previous php.notes (#189862) next »