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