2269 – D BUG: cosine of complex

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2269 - D BUG: cosine of complex
Summary: D BUG: cosine of complex
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 All
: P2 normal
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2008年08月06日 13:06 UTC by Walter Bright
Modified: 2015年06月09日 01:31 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
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 によって変換されたページ (->オリジナル) /