Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make median! type stable for small float types #29902

Merged
merged 1 commit into from
Nov 5, 2018
Merged

Conversation

andreasnoack
Copy link
Member

Fixed #29900

@andreasnoack andreasnoack added stdlib Julia's standard library backport pending 1.0 bugfix This change fixes an existing bug labels Nov 2, 2018
@StefanKarpinski
Copy link
Sponsor Member

I have an alternative fix that returns the first NaN value, preserving the payload of the specific NaN. Not sure if we care about that, but it is how arithmetic operations behave.

@andreasnoack
Copy link
Member Author

andreasnoack commented Nov 2, 2018

I don't have strong feelings here but on my machine there seems to be a time penalty for using findfirst relative to any and all floating point vectors will pay. I'm expecting few people will care much about getting the right kind of NaN when passing an abstractly typed vector. However, I'm fine with your judgement here so feel free to merge the one you prefer.

@StefanKarpinski
Copy link
Sponsor Member

Yeah, probably doesn't matter. Unfortunate that findfirst has a performance penalty but I agree.

@andreasnoack andreasnoack merged commit 5c464e9 into master Nov 5, 2018
@andreasnoack andreasnoack deleted the an/median branch November 5, 2018 21:25
KristofferC pushed a commit that referenced this pull request Nov 12, 2018
@KristofferC KristofferC mentioned this pull request Nov 12, 2018
61 tasks
tkf pushed a commit to tkf/julia that referenced this pull request Nov 21, 2018
KristofferC pushed a commit that referenced this pull request Dec 12, 2018
KristofferC pushed a commit that referenced this pull request Feb 11, 2019
KristofferC pushed a commit that referenced this pull request Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug stdlib Julia's standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants