octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60786] mpower: negative scalar to power of ma


From: Rik
Subject: [Octave-bug-tracker] [bug #60786] mpower: negative scalar to power of matrix containing non-integers returns nan
Date: Thu, 24 Jun 2021 17:07:47 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36

Follow-up Comment #12, bug #60786 (project octave):

Next question is step 2 and moving the eigenvalue decomposition into OR out of
the try/catch block.  The error messages will be different.  Here is a sample
session to show those differences.


octave:14> mpower (-2, x)
error: Failed to diagonalize matrix while calculating matrix exponential
octave:15> mpower (-2, complex (x))
error: EIG: matrix contains Inf or NaN values


In the first case, the eig call is within the try/catch block.  In the second
case, it is outside the try/catch block.

Does anyone have a preference?  I sort of appreciate the extra specificity of
the error message from eig() when it fails.  In this case, I purposefully did
have a NaN value in the matrix 'x'.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60786>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]