Microsoft KB Archive/59070

= INFO: Buffer Size for fcvt and ecvt Is 349 Bytes =

Article ID: 59070

Article Last Modified on 12/11/2003

-

APPLIES TO

 The C Run-Time (CRT), when used with:  Microsoft Visual C++ 1.0 Professional Edition

 Microsoft Visual C++ 1.5 Professional Edition

 Microsoft Visual C++ 1.0 Professional Edition

 Microsoft Visual C++ 2.0 Professional Edition</li></ul>

 Microsoft Visual C++ 4.0 Standard Edition</li></ul>

 Microsoft Visual C++ 5.0 Standard Edition</li></ul>

 Microsoft Visual C++ 6.0 Service Pack 5</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q59070

<div class="notice_section">

<div class="summary_section">

SUMMARY
In Microsoft C, the ecvt and fcvt routines use a single, statically allocated buffer while converting floating point numbers to character strings. The buffer is currently defined as 349 bytes. However, the largest double-precision variable that can be used is 309 bytes, with 40 bytes for padding. It is set up to be large enough to accommodate the largest double- precision number plus 40 decimal places (even though you only have 16 digits of accuracy in a double-precision IEEE number).

Keywords: kbinfo kbcrt KB59070

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.