bugGNU Octave - Bugs: bug #57908, complex exponentiation...

 
 

bug #57908: complex exponentiation compatibility issue

Submitted by:  John W. Eaton <jwe>
Submitted on:  Thu 27 Feb 2020 05:48:53 PM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  jwe Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 27 Feb 2020 06:34:12 PM UTC, comment #1: 

This is part of a much bigger issue with std::pow().  Interesting that we both came across it at the same time.  See bugs #57671, #57476, #54302, #52706.

Let me write something up for the Octave-Maintainers list (later today or tomorrow).

Rik <rik5>
Project Administrator
Thu 27 Feb 2020 05:48:53 PM UTC, original submission:  

In Octave,

x = complex (0, 0);
x ^ x  => NaN + NaNi
0 ^ 0 => 1

but I believe Matlab the complex exponentiation also returns 1 (or complex (1,0) if narrowing doesn't apply).

Do we need to hunt down and eliminate all uses of std::pow for complex arguments?

Would it be better to eliminate direct use of std::complex and use our own class derived from std::complex and that overloads pow with a function that does what we need for compatibility?

Have we discussed this issue previously?  If so, I didn't find a bug report about it.

John W. Eaton <jwe>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-27 rik5 StatusNone => Confirmed

    Back to the top


    Powered by Savane 3.5