Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
perl5 sprintf: wrong output on format %a #16327
This is a bug report for perl from email@example.com,
sprintf generates a wrong output for the format "%a".
0x1.ep+4 30.000000 3.000000e+001 30
Line 1 shows the buggy result of "%a".
######## test program #########
Site configuration information for perl 5.26.1:
Configured by strawberry-perl at Sat Sep 23 23:10:19 2017.
Summary of my perl5 (revision 5 version 26 subversion 1) configuration:
@INC for perl 5.26.1:
Environment for perl 5.26.1:
Wolf-Dietrich Moeller wrote:
That looks correct to me. What output were you expecting for %a?
There's certainly a bug there, with %e producing the wrong output.
I see the same on Strawberry 5.26.0 (gcc-7.1.0), and on my own mingw-w64
However, on my own build of 5.27.6 (gcc-7.2.0), the output of the test
Since the only difference between my build of 5.26.0 and my build of 5.27.6
This was fixed by commit 5d10f2f in
$ perl5.27.1 -we 'print sprintf("%a %e %f %g\n",30,30,30,30)'
Thank you for filing this report. You have helped make Perl better.
With the release yesterday of Perl 5.28.0, this and 185 other issues have been
Perl 5.28.0 may be downloaded via:
If you find that the problem persists, feel free to reopen this ticket.