Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite9a1a0d

Browse files
author
Michael Meskes
committed
Made ecpglib write double with a precision of 15 digits.
Patch by Akira Kurosawa <kurosawa-akira@mxc.nes.nec.co.jp>.
1 parente2bf629 commite9a1a0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -672,12 +672,12 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
672672
strcpy(mallocedval,"array [");
673673

674674
for (element=0;element<asize;element++)
675-
sprintf(mallocedval+strlen(mallocedval),"%.14g,", ((float*)var->value)[element]);
675+
sprintf(mallocedval+strlen(mallocedval),"%.15g,", ((float*)var->value)[element]);
676676

677677
strcpy(mallocedval+strlen(mallocedval)-1,"]");
678678
}
679679
else
680-
sprintf(mallocedval,"%.14g",*((float*)var->value));
680+
sprintf(mallocedval,"%.15g",*((float*)var->value));
681681

682682
*tobeinserted_p=mallocedval;
683683
*malloced_p= true;
@@ -692,12 +692,12 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
692692
strcpy(mallocedval,"array [");
693693

694694
for (element=0;element<asize;element++)
695-
sprintf(mallocedval+strlen(mallocedval),"%.14g,", ((double*)var->value)[element]);
695+
sprintf(mallocedval+strlen(mallocedval),"%.15g,", ((double*)var->value)[element]);
696696

697697
strcpy(mallocedval+strlen(mallocedval)-1,"]");
698698
}
699699
else
700-
sprintf(mallocedval,"%.14g",*((double*)var->value));
700+
sprintf(mallocedval,"%.15g",*((double*)var->value));
701701

702702
*tobeinserted_p=mallocedval;
703703
*malloced_p= true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp