numtools

perform numerical operations on vectors and matrices in unix pipes
git clone git://src.adamsgaard.dk/numtools # fast
git clone https://src.adamsgaard.dk/numtools.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit 6814924cd230827d0b9edc95ab7156125665d394
parent b14e514a2e52615aec6321ec8e308653323b36ef
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sun, 12 Sep 2021 07:30:32 +0200

print output in full double precision

Diffstat:
Mtranspose.c | 2+-
Mutil.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/transpose.c b/transpose.c @@ -32,7 +32,7 @@ main(void) } for (i = 0; i < nf; i++) { for (j = 0; j < nr; j++) { - printf("%g", vals[j][i]); + printf("%.17g", vals[j][i]); if (j < nr - 1) printf(DELIMSTR); } diff --git a/util.c b/util.c @@ -37,7 +37,7 @@ printarr(double *arr, size_t len) size_t i; for (i = 0; i < len; i++) { - printf("%g", arr[i]); + printf("%.17g", arr[i]); if (i < len) printf(DELIMSTR); }