This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sprintf does not display 54 digits on VMS
authorCraig A. Berry <craigberry@mac.com>
Sat, 2 Jan 2021 22:37:39 +0000 (16:37 -0600)
committerCraig A. Berry <craigberry@mac.com>
Sun, 3 Jan 2021 17:09:33 +0000 (11:09 -0600)
It displays 17, which is what Perl and apparently just about
everybody else used to do. I'm not convinced there was ever a
bug here as no standard I can find says you have to display 3
times as many digits as are necessary to provide a non-lossy
round trip from double to character and back.

t/op/sprintf2.t

index b1996e7..aa942df 100644 (file)
@@ -1187,6 +1187,8 @@ if($Config{nvsize} == 8) {
     TODO: {
         local $::TODO = 'Extended precision %g formatting' if $^O eq 'cygwin'
                                    or
+                               $^O eq 'VMS'
+                                   or
                                ($^O eq 'MSWin32' and
                                 $Config{cc} eq 'cl' and
                                 $Config{ccversion} =~ /^(\d+)/ and