D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.

Issue 2269

Summary: D BUG: cosine of complex
Product: D Reporter: Walter Bright <bugzilla>
Component: phobosAssignee: Walter Bright <bugzilla>
Status: RESOLVED FIXED
Severity: normal
Priority: P2
Version: D2
Hardware: x86
OS: All

Description Walter Bright 2008年08月06日 13:06:20 UTC
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 Walter Bright 2008年08月14日 03:03:47 UTC
Fixed dmd 1.034 and 2.018
Comment 2 Don 2008年08月14日 07:33:04 UTC
Same problem exists in Tango. Fixed in Tango commit #3878

AltStyle によって変換されたページ (->オリジナル) /