Skip to content

Add round(::Type{Complex{T}}, Complex{S})#47128

Closed
staticfloat wants to merge 1 commit intomasterfrom
sf/complex_rounding
Closed

Add round(::Type{Complex{T}}, Complex{S})#47128
staticfloat wants to merge 1 commit intomasterfrom
sf/complex_rounding

Conversation

@staticfloat
Copy link
Copy Markdown
Member

This is useful for doing things like round.(Complex{Int16}, complex_data), when you need to coerce to a single datatype.

This is useful for doing things like `round.(Complex{Int16}, complex_data)`,
when you need to coerce to a single datatype.
@staticfloat
Copy link
Copy Markdown
Member Author

Requesting review from @stevengj because GitHub suggested it. Feel free to point me toward someone else who might be more appropriate if necessary.

@gbaraldi
Copy link
Copy Markdown
Member

@staticfloat have you seen #42060

round(imag(z), ri; kwargs...))
end

function round(::Type{Complex{T}}, z::Complex) where {T}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this take an optional r::RoundingMode argument?

(That starts to get into the question of defining complex floor from #42060?)

LilithHafner pushed a commit that referenced this pull request Aug 7, 2023
@giordano giordano deleted the sf/complex_rounding branch February 25, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants