note 25365 added to function.hypot
| From: | Bard dot Skaflestad at math dot ntnu dot no | Date: | Fri, 20 Sep 2002 16:59:39 +0000 |
| Subject: | note 25365 added to function.hypot | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37055@lists.php.net to get a copy of this message | ||
When available, this function (hypot) is highly preferable to the roll-your-own version of
function hypot2($x, $y)
{
return sqrt($x*$x + $y*$y);
}
because it potentially takes care of underflow, overflow, accuracy, and, possibly, efficiency issues
which the above does not.
--
http://www.php.net/manual/en/function.hypot.php
http://master.php.net/manage/user-notes.php?action=edit+25365
http://master.php.net/manage/user-notes.php?action=delete+25365
http://master.php.net/manage/user-notes.php?action=reject+25365