Doc #77451 [NEW]: %g specifier to printf is misdocumented

From: Date: Sat, 12 Jan 2019 18:26:51 +0000
Subject: Doc #77451 [NEW]: %g specifier to printf is misdocumented
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16327@lists.php.net to get a copy of this message
From: markamery at btinternet dot com Operating system: N/A PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:%g specifier to printf is misdocumented Description: ------------ At http://php.net/manual/en/function.sprintf.php, the %g specifier is documented as follows: shorter of %e and %f. This isn't true. %g often uses scientific notation even though it'd be shorter not to, and what's more, its output may differ from BOTH %e and %f, since it strips trailing zeros and %f and %e don't. See https://stackoverflow.com/q/54162152/1709587 where I explore this point at length. -- Edit bug report at https://bugs.php.net/bug.php?id=77451&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77451&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77451&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77451&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77451&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77451&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77451&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77451&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77451&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77451&r=support Expected behavior: https://bugs.php.net/fix.php?id=77451&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77451&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77451&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77451&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77451&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77451&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77451&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77451&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77451&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77451&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77451&r=mysqlcfg

« previous php.doc.bugs (#16327) next »