[PATCH] *printf %e bug (36392)

php.internals

Matt W

19 years ago
Hi, Using the %e format specifier in the *printf() functions gives one less decimal place than it should. The recent *printf changes only happened to fix the problem when precision is 0. The new %E works correctly, which is obvious from the code. :-) Anyway, the attached patches remove the few problem lines. BTW, should there be a NEWS entry about the addition of %g, %G, and the previously missing %E (uppercase)? If I wasn't following the changes, that's something I'd want to see... :-) Matt

Ilia A.

19 years ago
Matt, The patch was applied, thanks. On 22-Dec-06, at 7:20 AM, Matt Wilmas wrote:
> Hi, > > Using the %e format specifier in the *printf() functions gives one > less > decimal place than it should. The recent *printf changes only > happened to > fix the problem when precision is 0. The new %E works correctly, > which is > obvious from the code. :-) Anyway, the attached patches remove the > few > problem lines. > > BTW, should there be a NEWS entry about the addition of %g, %G, and > the > previously missing %E (uppercase)? If I wasn't following the changes, > that's something I'd want to see... :-) > > > Matt > <printf_e.diff.txt> > <printf_e_5_2.diff.txt> > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php
Ilia Alshanetsky

Matt W

19 years ago
Hi Ilia, No problem. What about the Unicode version...? %e precision is still getting decremented there. ----- Original Message ----- From: "Ilia Alshanetsky" Sent: Friday, December 22, 2006

Ilia A.

19 years ago
Check your mail :-) On 22-Dec-06, at 10:42 AM, Matt Wilmas wrote:
> Hi Ilia, > > No problem. What about the Unicode version...? %e precision is still > getting decremented there. > > > ----- Original Message ----- > From: "Ilia Alshanetsky" > Sent: Friday, December 22, 2006 > >> Matt, >> >> The patch was applied, thanks. >> >> >> Ilia Alshanetsky > >
Ilia Alshanetsky

Matt W

19 years ago
From Hannes... about printf changes? I don't see what that has to do with this %e bug that is still there in the Unicode function. :-? Don't know what mail you mean otherwise, sorry. (I'm leaving in a second again, so probably won't reply.) Matt ----- Original Message ----- From: "Ilia Alshanetsky" Sent: Friday, December 22, 2006

Hannes Magnusson

19 years ago
Hi Ilia Are you sure this wasn't intended behavior? As far as I can see this has been like this for ever, it even breaks the test you added yourself over 4 years ago... -Hannes On 12/22/06, Ilia Alshanetsky <ilia@prohost.org> wrote: