summaryrefslogtreecommitdiff
path: root/src/c/urweb.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-12-03 16:54:04 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2013-12-03 16:54:04 -0500
commitd89fd37a66ab73ea7eba5e2574c4e679c4026f0b (patch)
treeae916e054118cec51b56e8eeb0f0a6f1157cb648 /src/c/urweb.c
parentabf4da5f80ce9ba5f693aa8fc2493eb28cd8e6f3 (diff)
Increase precision for rendering floats to SQL
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r--src/c/urweb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 4ff7a218..8bd5ada9 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -1622,7 +1622,7 @@ char *uw_Basis_attrifyFloat(uw_context ctx, uw_Basis_float n) {
int len;
uw_check_heap(ctx, FLOATS_MAX);
result = ctx->heap.front;
- sprintf(result, "%g%n", n, &len);
+ sprintf(result, "%.16g%n", n, &len);
ctx->heap.front += len+1;
return result;
}
@@ -2406,7 +2406,7 @@ char *uw_Basis_sqlifyIntN(uw_context ctx, uw_Basis_int *n) {
return uw_Basis_sqlifyInt(ctx, *n);
}
-char *uw_sqlfmtFloat = "%g::float8%n";
+char *uw_sqlfmtFloat = "%.16g::float8%n";
char *uw_Basis_sqlifyFloat(uw_context ctx, uw_Basis_float n) {
int len;