Skip to content

[BUG Incorrect Complex subtraction operator #457

Description

@lohedges

The current double subtraction operator appears to be broken:

/** Subtraction */
Complex operator-(double x, const Complex &z)
{
return z - x;
}

For example, the division operator below is:

/** Division */
Complex operator/(double x, const Complex &z)
{
return Complex(x) / z;
}

Presumably the correct implementation should be:

    return Complex(x) - z;

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions