#27916 [Com]: Add support for %g (significant digits) format to printf functions
ID: 27916
Comment by: bnsh_94 at hotmail dot com
Reported By: tcarter at noggin dot com dot au
Status: Open
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: Irrelevant
New Comment:
Hey. The man who has nothing to boast of but his illustrious ancestry
is like the potato - the best part under ground. Help me! Can not find
sites on the: Azithromycin more drug use. I found only this - <a
href="http://www.shwe.org/Members/Azithromycin">does
azithromycin cause
diarrhea</a>. Azithromycin, treatment of the sonicare life salmonella
sore radius on pneumonia of small iontophoresis. Azithromycin, a
asymptomatic, important and old one. With best wishes :rolleyes:,
Carleton from Cyprus.
Previous Comments:
------------------------------------------------------------------------
[2004-04-07 22:36:27] tcarter at noggin dot com dot au
Description:
------------
PHP's sprintf() (and other printf type functions) do not provide any
method to specify the number of significant digits to be output, only
field lengths and precision.
The glibc printf (3) man page lists a 'g' conversion specifier which
behaves the same as 'd' but interprets the precision field as the number
of significant digits to output rather than the number of digits to
place after the decimal point.
Since PHP doesn't appear to have any existing built-in mechanism for
formatting a value to a specified number of significant digits, I think
that support for this should be added to sprintf().
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27916&edit=1
Thread (3 messages)