[gnumeric] long double: fix some debug printouts.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] long double: fix some debug printouts.
- Date: Thu, 3 Feb 2022 23:16:19 +0000 (UTC)
commit 4adc9772f95fda44f01d2de309d5f82fcfebad2e
Author: Morten Welinder <terra gnome org>
Date: Thu Feb 3 18:14:24 2022 -0500
long double: fix some debug printouts.
plugins/nlsolve/gnm-nlsolve.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plugins/nlsolve/gnm-nlsolve.c b/plugins/nlsolve/gnm-nlsolve.c
index 623936e02..38f042332 100644
--- a/plugins/nlsolve/gnm-nlsolve.c
+++ b/plugins/nlsolve/gnm-nlsolve.c
@@ -242,14 +242,14 @@ newton_improve (GnmNlsolve *nl, gnm_float *xs)
ok = TRUE;
} else {
if (nl->debug)
- g_printerr ("Full newton step would go to %g\n", y2);
+ g_printerr ("Full newton step would go to %" GNM_FORMAT_g "\n", y2);
f = gnm_solver_line_search
(sol, xs, d, FALSE, 0.75, 1, 0.01, &y2);
if (f > 0 && f < 1 && y2 < isol->yk) {
if (nl->debug)
- g_printerr ("Accepting reduced newton step with f=%g\n", f);
+ g_printerr ("Accepting reduced newton step with f=%" GNM_FORMAT_g
"\n", f);
for (i = 0; i < n; i++)
isol->xk[i] = xs[i] + f * d[i];
isol->yk = y2;
@@ -453,7 +453,9 @@ rosenbrock_iter (GnmNlsolve *nl)
for (i = 0; i < n; i++) {
nl->xi[0][i] = A[0][i] / div;
if (!gnm_finite (nl->xi[0][i])) {
- g_printerr ("%g %g %g\n",
+ g_printerr ("%" GNM_FORMAT_g
+ " %" GNM_FORMAT_g
+ " %" GNM_FORMAT_g "\n",
div, A[0][i], nl->xi[0][i]);
g_assert (gnm_finite (nl->xi[0][i]));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]