From 07dc766ad4552b1f10cf4640c7ac4e6a64de3f1f Mon Sep 17 00:00:00 2001 From: Chou Hung-Yi Date: Wed, 23 May 2018 22:51:51 +0800 Subject: [PATCH] print more digits of model parameter: %.16g to %.17g --- linear.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linear.cpp b/linear.cpp index 746192b..1f04a60 100644 --- a/linear.cpp +++ b/linear.cpp @@ -2792,14 +2792,14 @@ int save_model(const char *model_file_name, const struct model *model_) fprintf(fp, "nr_feature %d\n", nr_feature); - fprintf(fp, "bias %.16g\n", model_->bias); + fprintf(fp, "bias %.17g\n", model_->bias); fprintf(fp, "w\n"); for(i=0; iw[i*nr_w+j]); + fprintf(fp, "%.17g ", model_->w[i*nr_w+j]); fprintf(fp, "\n"); } -- 2.50.1