D issues are now
tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Summary: |
D BUG: cosine of complex |
Product: |
D
|
Reporter: |
Walter Bright <bugzilla> |
Component: |
phobos | Assignee: |
Walter Bright <bugzilla> |
Status: |
RESOLVED
FIXED
|
Severity: |
normal
|
Priority: |
P2
|
Version: |
D2 |
Hardware: |
x86 |
OS: |
All |
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
Same problem exists in Tango. Fixed in Tango commit #3878