8000 Subtraction of double with Complex has wrong output · Issue #400 · culiniac/aforge · GitHub
[go: up one dir, main page]

Skip to content
8000

Subtraction of double with Complex has wrong output #400

Open

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
Following function (in AForge.Math.Complex):

public static Complex Subtract( double s, Complex a )
{
     return new Complex( s - a.Re, a.Im );
}

The return value contains an error. The imaginary part should also be negated:

public static Complex Subtract( double s, Complex a )
{
     return new Complex( s - a.Re, - a.Im );
}

What version of the product are you using?
2.2.5

Please provide any additional information below.

Original issue reported on code.google.com by rob.bier...@gmail.com on 8 Mar 2015 at 8:26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0