You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Detaille Octave (JIRA)" <ji...@apache.org> on 2015/11/15 17:40:10 UTC
[jira] [Created] (MATH-1289) Incorrect calculation in
org.apache.commons.math3.complex.Complex#multiply
Detaille Octave created MATH-1289:
-------------------------------------
Summary: Incorrect calculation in org.apache.commons.math3.complex.Complex#multiply
Key: MATH-1289
URL: https://issues.apache.org/jira/browse/MATH-1289
Project: Commons Math
Issue Type: Bug
Affects Versions: 3.5
Environment: Linux 3.16.0-44-generic #59-Ubuntu SMP Tue Jul 7 02:07:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
Reporter: Detaille Octave
Hello guys!
If think there is a bug in the org.apache.commons.math3.complex.Complex#multiply method
Line 536 & 537 below are not correct
{code:title=Complex.java|borderStyle=solid}
return createComplex(real * factor.real - imaginary * factor.imaginary, real * factor.imaginary + imaginary * factor.real);
{code}
It should be
{code:title=Complex.java|borderStyle=solid}
return createComplex(real * factor.real + imaginary * factor.imaginary, imaginary * factor.real-real * factor.imaginary);
{code}
Can you confirm that? Or do I miss something?
Thanks a lot (also, for this excellent library).
Best,
Octave
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)