Skip to content

Multiplication by -im has inconsistent imaginary part sign compared with floating point arithmetic #237

@dlfivefifty

Description

@dlfivefifty

I found an inconsistency:

julia> -im * big(0.0-10.0im)
-10.0 - 0.0im

julia> -im * (0.0-10.0im)
-10.0 - 0.0im

julia> -im * ComplexDF64(0.0-10.0im) # has opposite imaginary sign
-10.0 + 0.0im

This causes the following to give different results:

julia> log( -im * (0.0-10.0im))
2.302585092994046 - 3.141592653589793im

julia> log(-im * ComplexDF64(0.0-10.0im))
2.30258509299404568401799145468437419 + 3.14159265358979323846264338327950588im

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions