|
From: Vincent T. <vt...@un...> - 2007-08-28 22:01:55
|
Hey,
As mentioned in the wiki, printf-like functions can not handle the %a
modifier character.
I need it in a library to convert from double to string and conversely
using the format specified by %a.
I've already written a function that does the conversion of a string to a
double. It's not very complicated.
Now, I would need to convert a double to a string, using the format
that would be created by snprintf ("%a"). I'm a bit lost, as, as mentioned
in the documentation of printf :
"If the precision is missing, it is taken as enough to represent the
floating-point number exactly, and no rounding occurs." [1]
I don't know how to achieve that.
Does someone has ideas, or hints, or links to do such thing ?
thank you
Vincent Torri
[1] http://www.hmug.org/man/3/printf.php
|