note 19002 added to function.sqrt
| From: | webmaster at phpfacile dot com | Date: | Wed, 13 Feb 2002 04:13:12 +0000 |
| Subject: | note 19002 added to function.sqrt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26537@lists.php.net to get a copy of this message | ||
The function pow() was modified to raise an error when you try to calculate square root of a
negative number.
It seems that it's not the case for the sqrt function.
That script:
<?php
echo sqrt(-3);
?>
returns
-1.#IND
in version 4.1.1.
That's not so nice ...
--
http://www.php.net/manual/en/function.sqrt.php
http://master.php.net/manage/user-notes.php?action=edit+19002
http://master.php.net/manage/user-notes.php?action=delete+19002
http://master.php.net/manage/user-notes.php?action=reject+19002