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: Mon, 28 Jun 2021 15:03:15 -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

Update of bug #60786 (project octave):

                  Status:          Ready For Test => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #16:

I checked in a series of changesets that generally improve things.

See:

1. http://hg.savannah.gnu.org/hgweb/octave/rev/212322c0e44e
2. http://hg.savannah.gnu.org/hgweb/octave/rev/0474c3a27d16
3. http://hg.savannah.gnu.org/hgweb/octave/rev/ef138252af51

I think this is good enough now for this bug report so I am going to mark the
issue as fixed.

There are still opportunities for optimization:

1. Use templates to more concisely cover Matrix, FloatMatrix, NDArray,
FloatNDArray cases rather than having lots of code duplication.

2. Don't call octave_quit() for every iteration of elem_xpow().  For example,
in some of the library routines in liboctave/Array we check for interrupts
only after 4 executions of the innermost loop.  That same syntax could be
copied to xpow.cc.  In addition, even 4 loop iterations is probably less than
a millisecond execution time so the number 4 could probably be increased.

3. The code uses operator indexing which is the equivalent of calling elem(). 
However, the code knows the exact size of matrices so these could be
re-written to use xelem() for a possible performance benefit.

    _______________________________________________________

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]