Thread overview
[Issue 11652] New: No numerical ^^ complex operation in std.complex
[Issue 11652] Support numerical ^^ complex operations in std.complex
November 30, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11652

           Summary: No numerical ^^ complex operation in std.complex
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: joseph.wakeling@webdrake.net


--- Comment #0 from Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> 2013-11-30 08:42:53 PST ---
std.complex supports exponentiation of the form complex ^^ numeric but lacks support for numeric ^^ complex.

Example:

    auto rec = 2.0 ^^ complex(1.1, 2.2);

results in

    Error: incompatible types for ((2.00000) ^^ (complex(1.1, 2.2))): 'double'
and 'Complex!double'

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 30, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11652



--- Comment #1 from Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> 2013-11-30 08:43:48 PST ---
This is fairly easy to fix -- just add an opBinaryRight for numeric LHS with op == "^^".  I'll submit a patch shortly.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 01, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11652



--- Comment #2 from Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> 2013-12-01 03:14:56 PST ---
Pull request with fix: https://github.com/D-Programming-Language/phobos/pull/1740

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 09, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11652



--- Comment #3 from github-bugzilla@puremagic.com 2013-12-09 09:28:23 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/2de19c7f7b13f63c1d74487ce4063b4283e97eae Merge pull request #1740 from WebDrake/numeric-op-complex

Fix Issue 11652: support numerical ^^ complex operations in std.complex

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 09, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11652


Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------