Hi
I have problems trying to use sprintf to write floating-point values to strings. It seems the sprintf result is correct, and the sprintf call does return succesfully, but some kind of memory corruption occurs and my program crashes eventually and jumps to an infinity loop. I have already read a lot of posts on sprintf. I have increased stack size up to 2K and try snprintf instead of sprintf but still did not find a solution.
Anyway I don't think it is a good idea to waste 2K words of RAM just to get 20 byte length string. In my application I need to convert just one float value (may be double precision [64 bit] in the future) in to the exponential format ( %E ) string with few constant characters before the value; i.e. I need to get a "1.000000E-01" for 0.1 float number, not "0.1". I have seen a couple of ftoa() implementations here but all of them don`t seem to fit (one of them gives me "1.2799e30" for 128e28 value another gives "not fit").
Can anybody give me any idea how to solve my problem?
Thanks.