Topic
  • 4 replies
  • Latest Post - ‏2013-12-06T17:59:55Z by dhvd79a
dhvd79a
dhvd79a
3 Posts

Pinned topic Unexpected put list output

‏2013-10-16T12:28:53Z |
  Below is a snippet from a program that generates some test data. 
 
       DCL FLOAT_bin070  FLOAT BINARY(070);
       dcl float_hex070 char((2 * size(float_bin070)));
 
       DCL FLOAT_bin071  FLOAT BINARY(071);
       dcl float_hex071 char((2 * size(float_bin071)));
 
       DCL FLOAT_bin072  FLOAT BINARY(072);
       dcl float_hex072 char((2 * size(float_bin072)));
 
       DCL FLOAT_bin073  FLOAT BINARY(073);
       dcl float_hex073 char((2 * size(float_bin073)));
 
 
 
       DCL test_data FIXED DECIMAL(15,10);
 
       test_data = 1.5;
 
       float_bin070 = test_data;
       float_hex070 = hex(float_bin070);
       put list (float_hex070 ||"," || float_bin070 ||","
               || 070 ||"," || CEIL(70/3.32) || "," || test_data) skip;
 
       float_bin071 = test_data;
       float_hex071 = hex(float_bin071);
       put list (float_hex071 ||"," || float_bin071 ||","
               || 071 ||"," || CEIL(71/3.32) || "," || test_data) skip;
 
       float_bin072 = test_data;
       float_hex072 = hex(float_bin072);
       put list (float_hex072 ||"," || float_bin072 ||","
               || 072 ||"," || CEIL(72/3.32) || "," || test_data) skip;
 
       float_bin073 = test_data;
       float_hex073 = hex(float_bin073);
       put list (float_hex073 ||"," || float_bin073 ||","
               || 073 ||"," || CEIL(73/3.32) || "," || test_data) skip;
 
Using the formula CEIL (n/3.32) all of the binary precisions 70-73 calculate to 22 decimal precision.  Given the same value I assumed that the output would be the same however for precision 73 the scientific notation displays with 1 extra zero.  Can anyone explain this?  This also happens for the range 80-83.  
 
 
 Floating point register value                          Sci notation                                             BP       DP       input data
 41180000000000003300000000000000, 1.500000000000000000000E+00,    70,      22,      1.5000000000
 41180000000000003300000000000000, 1.500000000000000000000E+00,    71,      22,      1.5000000000
 41180000000000003300000000000000, 1.500000000000000000000E+00,    72,      22,      1.5000000000
 41180000000000003300000000000000, 1.5000000000000000000000E+00,   73,      22,     1.5000000000
 
The results are the same using Enterprise PL/I 3.9 through 4.4.
 
 
                                   
Updated on 2013-10-16T12:29:25Z at 2013-10-16T12:29:25Z by dhvd79a
  • Robin500
    Robin500
    8 Posts

    Re: Unexpected put list output

    ‏2013-10-18T23:36:30Z  

    The extra digit seems to be erroneous.

    Why not send a note to Peter Elderon?

  • pelderon
    pelderon
    11 Posts

    Re: Unexpected put list output

    ‏2013-10-21T15:55:49Z  

    There is a small bug in the library code that it is behind this problem. Please open a PMR for this problem, and we will open an APAR for it and ship a fix.

  • dhvd79a
    dhvd79a
    3 Posts

    Re: Unexpected put list output

    ‏2013-10-21T16:21:16Z  
    • pelderon
    • ‏2013-10-21T15:55:49Z

    There is a small bug in the library code that it is behind this problem. Please open a PMR for this problem, and we will open an APAR for it and ship a fix.

    Thank you.  I will open the PMR today.

    Updated on 2013-10-21T16:21:30Z at 2013-10-21T16:21:30Z by dhvd79a
  • dhvd79a
    dhvd79a
    3 Posts

    Re: Unexpected put list output

    ‏2013-12-06T17:59:55Z  
    APAR PM99663 fixes this issue.