summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes2011-07-18 14:30:51 +0000
committerMichael Meskes2011-07-18 14:34:24 +0000
commite9a1a0d00bd2b88844542e71884b1e9b8bd32fa1 (patch)
tree936a9de93df4d7c5190ce6392da1a9c61cf94fb9
parente2bf6295993745f7f697a337346168826234720c (diff)
Made ecpglib write double with a precision of 15 digits.
Patch by Akira Kurosawa <[email protected]>.
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 09e1a820d4a..1e3d4182bb9 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -672,12 +672,12 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
strcpy(mallocedval, "array [");
for (element = 0; element < asize; element++)
- sprintf(mallocedval + strlen(mallocedval), "%.14g,", ((float *) var->value)[element]);
+ sprintf(mallocedval + strlen(mallocedval), "%.15g,", ((float *) var->value)[element]);
strcpy(mallocedval + strlen(mallocedval) - 1, "]");
}
else
- sprintf(mallocedval, "%.14g", *((float *) var->value));
+ sprintf(mallocedval, "%.15g", *((float *) var->value));
*tobeinserted_p = mallocedval;
*malloced_p = true;
@@ -692,12 +692,12 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
strcpy(mallocedval, "array [");
for (element = 0; element < asize; element++)
- sprintf(mallocedval + strlen(mallocedval), "%.14g,", ((double *) var->value)[element]);
+ sprintf(mallocedval + strlen(mallocedval), "%.15g,", ((double *) var->value)[element]);
strcpy(mallocedval + strlen(mallocedval) - 1, "]");
}
else
- sprintf(mallocedval, "%.14g", *((double *) var->value));
+ sprintf(mallocedval, "%.15g", *((double *) var->value));
*tobeinserted_p = mallocedval;
*malloced_p = true;