Skip to content

Commit

Permalink
CXSparse: silence spurious CodeQL warning; alpha*conj(alpha) is real
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Oct 29, 2023
1 parent 745f05f commit 1af04dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CXSparse/Source/cs_updown.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CS_INT cs_updown (cs *L, CS_INT sigma, const cs *C, const CS_INT *parent)
{
p = Lp [j] ;
alpha = w [j] / Lx [p] ; /* alpha = w(j) / L(j,j) */
beta2 = beta*beta + sigma*alpha*CS_CONJ(alpha) ;
beta2 = beta*beta + sigma*((double) (alpha*CS_CONJ(alpha))) ;
if (beta2 <= 0) break ; /* not positive definite */
beta2 = sqrt (beta2) ;
delta = (sigma > 0) ? (beta / beta2) : (beta2 / beta) ;
Expand Down

0 comments on commit 1af04dd

Please sign in to comment.