From: Peter Prymmer Date: Tue, 19 Jun 2001 17:18:06 +0000 (-0700) Subject: RFC: what are applicable standards for exponent sizes? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=12ebcc11efb030b92d1709cef31a629cdc6aa1f2;p=p5sagit%2Fp5-mst-13.2.git RFC: what are applicable standards for exponent sizes? Message-ID: p4raw-id: //depot/perl@10851 --- diff --git a/t/op/sprintf.t b/t/op/sprintf.t index a2dd6a5..515996a 100755 --- a/t/op/sprintf.t +++ b/t/op/sprintf.t @@ -31,6 +31,12 @@ $SIG{__WARN__} = sub { for ($i = 1; @tests; $i++) { ($template, $data, $result, $comment) = @{shift @tests}; + if ($^O eq 'os390') { + $data =~ s/([eE])96$/${1}63/; # smaller exponents + $result =~ s/([eE]\+)102$/${1}69/; # " " + $data =~ s/([eE])\-101$/${1}-56/; # larger exponents + $result =~ s/([eE])\-102$/${1}-57/; # " " + } $evalData = eval $data; $w = undef; $x = sprintf(">$template<", @@ -96,6 +102,12 @@ for ($i = 1; @tests; $i++) { >%.0f< >-0.1< >-0< >C library bug: no minus on VMS, HP-UX< >%.0f< >1.5< >2< >Standard vague: no rounding rules< >%.0f< >2.5< >2< >Standard vague: no rounding rules< +>%G< >1234567e96< >1.23457E+102< >exponent too big for OS/390< +>%G< >.1234567e-101< >1.23457E-102< >exponent too small for OS/390< +>%e< >1234567E96< >1.234567e+102< >exponent too big for OS/390< +>%e< >.1234567E-101< >1.234567e-102< >exponent too small for OS/390< +>%g< >.1234567E-101< >1.23457e-102< >exponent too small for OS/390< +>%g< >1234567E96< >1.23457e+102< >exponent too big for OS/390< =end problematic