Thread overview
[Issue 2269] New: D BUG: cosine of complex
Aug 06, 2008
d-bugmail
Aug 14, 2008
d-bugmail
Aug 14, 2008
d-bugmail
August 06, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2269

           Summary: D BUG: cosine of complex
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: bugzilla@digitalmars.com


I am doing some programming in D and
I dicovered that cos(z), where z is a
complex number, is computed incorrectly.
After looking at the documentation, D
uses the equation:

cos(z) = cos(z.re)*cosh(z.im) + sin(z.re)*sinh(z.im)i

The correct equation is actually the complex conjugate
of the above equation:

cos(z) = cos(z.re)*cosh(z.im) - sin(z.re)*sinh(z.im)i


-- 

August 14, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2269


bugzilla@digitalmars.com changed:

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




------- Comment #1 from bugzilla@digitalmars.com  2008-08-14 03:03 -------
Fixed dmd 1.034 and 2.018


-- 

August 14, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2269





------- Comment #2 from clugdbug@yahoo.com.au  2008-08-14 07:33 -------
Same problem exists in Tango. Fixed in Tango commit #3878


--