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

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

[Octave-bug-tracker] [bug #57908] complex exponentiation compatibility i


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #57908] complex exponentiation compatibility issue
Date: Thu, 27 Feb 2020 12:48:54 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

URL:
  <https://savannah.gnu.org/bugs/?57908>

                 Summary: complex exponentiation compatibility issue
                 Project: GNU Octave
            Submitted by: 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: None
             Assigned to: None
         Originator Name: jwe
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

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.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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