bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Conversion error with _ecvt(...) function


From: Olivier DERVYN
Subject: Conversion error with _ecvt(...) function
Date: Thu, 4 Jul 2002 16:30:10 +0200

The code
strcpy( szTmpBuf, _ecvt( d, nConvLen, &decimal, &sign ) );
with var setted as following
nConvLen = 57
d = 1.4159265650000e+050

return following string
14159265650000001\0ΓΏ..... in szTmpBuf
and     decimal contain 51
          sign contain 0

string is displayed with printf : 14159265650000001

Result wait is 141592656500000010000000000000000000000000000000000.000000

Please, anybody can confirm this problem and send me a workaround.

Regards, Olivier








reply via email to

[Prev in Thread] Current Thread [Next in Thread]