IBM Support

IV24433: SPRINTF PRINTS ONE MORE FRACTIONAL DIGIT THAN SPECIFIED APPLIES TO AIX 7100-01

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • When we invoke sprintf(buffer,"%.*f",4,f) to print 4
    fractional digits, the result prints 5 digits.
    This problem occurs when the program is compiled in
    64-bit binary.
    
    The problem happens on AIX6.1 TL07 SP03 and
    AIX7.1 TL01 SP03.
    

Local fix

Problem summary

  • In a 64-bit applications when we invoke
    sprintf(buffer,"%.*f",4,f) to print 4 fractional digits, the
    sprintf prints 5 digits, that is an extra digit, in the cases
    where f is a floating point value in which integer part is
    zero, as well as the fractional digits upto the specified
    precision are all zeros. So essentially sprintf prints
    an extra zero.
    

Problem conclusion

  • Code changes have been made to correct sprintf, to print
    exact number of fractional digits as specified.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV24433

  • Reported component name

    AIX V7.1

  • Reported component ID

    5765H4000

  • Reported release

    710

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Submitted date

    2012-07-07

  • Closed date

    2013-08-05

  • Last modified date

    2014-02-17

  • APAR is sysrouted FROM one or more of the following:

    IV23030

  • APAR is sysrouted TO one or more of the following:

    U864708

Fix information

  • Fixed component name

    AIX V7.1

  • Fixed component ID

    5765H4000

Applicable component levels

  • R710 PSY U864708

       UP14/02/17 I 1000



Document information

More support for: AIX Enterprise Edition

Software version: 710

Operating system(s): AIX

Reference #: IV24433

Modified date: 17 February 2014


Translate this page: