View topic - printf %.02E

printf %.02E

Read-only archive of qnx.development_tools (Self-hosted graphical development with the Eclipse IDE and cross-hosted development on Solaris, Linux, or Windows) at

printf %.02E

Postby oklapek » Tue Jul 25, 2006 6:00 am


I have problem with display float value in function printf with format
"%.02E", "%.10E" ... ( +8 )

float F = 8.00E-06;
Result is
printf( "%.01E", F ); 8.0E-06
printf( "%.02E", F ); 7.99E-06
printf( "%.03E", F ); 8.000E-06

Round with format "%.02E" dos not work correct. Result should be
8.00E-06 and not 7.99E-06
It looks like bug in libc module xldtob.c function _Ldtob.
In line 125 is not correct initialized value gen for format e and E. (I
have look on

Of course I can solve this problem with format "%#.03G"

I am using QNX 6.3 SP1. My be it is known bug repaired in new version.
If not can somebody repair it ?

Active Member
Posts: 21
Joined: Thu May 06, 2004 11:16 am

Return to qnx.development_tools

Who is online

Users browsing this forum: No registered users and 1 guest