use %a for more precision

SVN revision: 14848
This commit is contained in:
Carsten Haitzler 2005-05-19 00:13:25 +00:00
parent 17e9714ac7
commit 4acd48f5af
1 changed files with 2 additions and 2 deletions

View File

@ -355,7 +355,7 @@ eet_data_put_float(void *src, int *size_ret)
s = (float *)src;
prev_locale = setlocale(LC_NUMERIC, "C");
snprintf(buf, sizeof(buf), "%16.16f", (double)(*s));
snprintf(buf, sizeof(buf), "%a", (double)(*s));
if (prev_locale) setlocale(LC_NUMERIC, prev_locale);
len = strlen(buf);
d = malloc(len + 1);
@ -400,7 +400,7 @@ eet_data_put_double(void *src, int *size_ret)
s = (double *)src;
prev_locale = setlocale(LC_NUMERIC, "C");
snprintf(buf, sizeof(buf), "%32.32f", (double)(*s));
snprintf(buf, sizeof(buf), "%a", (double)(*s));
if (prev_locale) setlocale(LC_NUMERIC, prev_locale);
len = strlen(buf);
d = malloc(len + 1);