From 6f413962133f2a07239032b19e4d80bc59def52e Mon Sep 17 00:00:00 2001 From: Brendan O'Donoghue Date: Tue, 2 Jul 2024 05:10:30 +0000 Subject: [PATCH] rename var --- include/glbopts.h | 2 +- src/scs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/glbopts.h b/include/glbopts.h index d0be30ba..ed2a15b5 100644 --- a/include/glbopts.h +++ b/include/glbopts.h @@ -40,7 +40,7 @@ extern "C" { #define LOG_CSV_FILENAME (0) #define TIME_LIMIT_SECS (0.) /* Tolerance to check negativity condition for infeasibility */ -#define EPS_INFEAS_TOL (1e-9) +#define INFEAS_NEGATIVITY_TOL (1e-9) /* redefine printfs as needed */ #if NO_PRINTING > 0 /* Disable all printing */ #define scs_printf(...) /* No-op */ diff --git a/src/scs.c b/src/scs.c index 7b76c4dc..7dfd092a 100644 --- a/src/scs.c +++ b/src/scs.c @@ -207,13 +207,13 @@ static void compute_residuals(ScsResiduals *r, scs_int m, scs_int n) { r->res_unbdd_a = NAN; r->res_unbdd_p = NAN; r->res_infeas = NAN; - if (r->ctx_tau < -EPS_INFEAS_TOL) { + if (r->ctx_tau < -INFEAS_NEGATIVITY_TOL) { nm_ax_s = NORM(r->ax_s, m); nm_px = NORM(r->px, n); r->res_unbdd_a = SAFEDIV_POS(nm_ax_s, -r->ctx_tau); r->res_unbdd_p = SAFEDIV_POS(nm_px, -r->ctx_tau); } - if (r->bty_tau < -EPS_INFEAS_TOL) { + if (r->bty_tau < -INFEAS_NEGATIVITY_TOL) { nm_aty = NORM(r->aty, n); r->res_infeas = SAFEDIV_POS(nm_aty, -r->bty_tau); }