Bug 2269 – D BUG: cosine of complex

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2008-08-06T13:06:00Z
Last change time
2015-06-09T01:31:15Z
Assigned to
bugzilla
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2008-08-06T13:06:20Z
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
Comment #1 by bugzilla — 2008-08-14T03:03:47Z
Fixed dmd 1.034 and 2.018
Comment #2 by clugdbug — 2008-08-14T07:33:04Z
Same problem exists in Tango. Fixed in Tango commit #3878