#19621 [NEW]: Math needs a "sign()" function
| From: | bill at softky dot com | Date: | Thu, 26 Sep 2002 18:52:07 +0000 |
| Subject: | #19621 [NEW]: Math needs a "sign()" function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-20471@lists.php.net to get a copy of this message | ||
From: bill@softky.com
Operating system: Mandrake linux
PHP version: 4.2.0
PHP Bug Type: Feature/Change Request
Bug description: Math needs a "sign()" function
The wonderful math-function list is missing a very important and simple
function: sign(). The is the comlpementof abs(), and together with abs()
allows you to separate the magnitude and sign of a number, e.g. for
graphing purposes (it's hard to graph a negative number of pixels, and
displaying money as "$-99" looks dumb).
It's a one-line function, so I've already written my own, but it really
ought to be built-in.
Thanks!
--
Edit bug report at http://bugs.php.net/?id=19621&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19621&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19621&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19621&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19621&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19621&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19621&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19621&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19621&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19621&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19621&r=globals