mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-06-28 15:39:02 +08:00
Debian patch 130-export-smallfloat from Vincent Fourmond
This commit is contained in:
parent
6181b11faf
commit
4fb8786418
@ -837,13 +837,13 @@ char *mdb_col_to_string(MdbHandle *mdb, void *buf, int start, int datatype, int
|
|||||||
break;
|
break;
|
||||||
case MDB_FLOAT:
|
case MDB_FLOAT:
|
||||||
tf = mdb_get_single(buf, start);
|
tf = mdb_get_single(buf, start);
|
||||||
text = g_strdup_printf("%.*f",
|
text = g_strdup_printf("%.*e",
|
||||||
FLT_DIG - floor_log10(tf,1) - 1, tf);
|
FLT_DIG - floor_log10(tf,1) - 1, tf);
|
||||||
trim_trailing_zeros(text);
|
trim_trailing_zeros(text);
|
||||||
break;
|
break;
|
||||||
case MDB_DOUBLE:
|
case MDB_DOUBLE:
|
||||||
td = mdb_get_double(buf, start);
|
td = mdb_get_double(buf, start);
|
||||||
text = g_strdup_printf("%.*f",
|
text = g_strdup_printf("%.*e",
|
||||||
DBL_DIG - floor_log10(td,0) - 1, td);
|
DBL_DIG - floor_log10(td,0) - 1, td);
|
||||||
trim_trailing_zeros(text);
|
trim_trailing_zeros(text);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user