I'm trying to find out what is the correction APAR for the following problem, if any, before I ask system administrator to apply patches. I have not found any relevant.
I call sprintf(buf,"%.f", 0.00249000000269461452) and the result is wrong ("00" instead of "0").
This only happens on 64-bit binary; 32-bit one is OK. When I build on AIX 5.3, the same binary has problems on AIX 6.1 I have, so this is not a compiler problem.
oslevel -r: 6100-07
oslevel -s: 6100-07-03-1207
lsattr -EO -l proc0 -a type: PowerPC_POWER7
/usr/bin/lslpp -l | grep -w bos.rte.libc | sort | uniq: 188.8.131.52
I attach a source file (dbl1.c), "make run" reports:
xlc -q64 dbl1.c -o dbl1
wrong, must be "<0>"
make: 1254-004 The error code from the last command is 255.
This topic has been locked.
5 replies Latest Post - 2013-02-03T07:22:44Z by SystemAdmin
Pinned topic sprintf format precision bug on AIX 6.1 64-bit
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-02-03T07:22:44Z at 2013-02-03T07:22:44Z by SystemAdmin
Re: sprintf format precision bug on AIX 6.1 64-bit2012-11-21T11:17:01Z in response to SystemAdminWell, now I need to wait for our IT guys to help me to obtain the article:
This takes forever.