note 97672 added to ref.math
| From: | Lucio at osu1 dot php dot net | Date: | Sun, 02 May 2010 14:49:16 +0000 |
| Subject: | note 97672 added to ref.math | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168854@lists.php.net to get a copy of this message | ||
@michal at roszka dot pl
Your sgn function will not work correctly for numbers between -1 and 0 or between 0 and 1:
<?php
echo sgn(0.5); // will yield 0.5
echo sgn(-0.5); // will yield -0.5
?>
----
Server IP: 69.147.83.197
Probable Submitter: 84.75.188.2
----
Manual Page -- http://www.php.net/manual/en/ref.math.php
Edit -- https://master.php.net/note/edit/97672
Del: integrated -- https://master.php.net/note/delete/97672/integrated
Del: useless -- https://master.php.net/note/delete/97672/useless
Del: bad code -- https://master.php.net/note/delete/97672/bad+code
Del: spam -- https://master.php.net/note/delete/97672/spam
Del: non-english -- https://master.php.net/note/delete/97672/non-english
Del: in docs -- https://master.php.net/note/delete/97672/in+docs
Del: other reasons-- https://master.php.net/note/delete/97672
Reject -- https://master.php.net/note/reject/97672
Search -- https://master.php.net/manage/user-notes.php