Skip to content

Use widening with addition and subtraction #12

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

Merged
merged 1 commit into from
Sep 5, 2014
Merged

Use widening with addition and subtraction #12

merged 1 commit into from
Sep 5, 2014

Conversation

timholy
Copy link
Member

@timholy timholy commented Sep 2, 2014

The original design decision was made in part to anticipate changes
Julia 0.4. Unfortunately, this runs into major trouble with
reductions. Since we need a package that works on 0.3, these changes
seem necessary. Once someone implements widening in the reduction functions
for 0.4, this change can probably be reverted (on the julia 0.4- branch of this package).

The original design decision was made in part to anticipate changes
Julia 0.4. Unfortunately, this runs into major trouble with
reductions. Since we need a package that works on 0.3, these changes
seem necessary. Once someone implements widening in the reduction functions
for 0.4, this change can probably be reverted.
@JeffBezanson
Copy link
Collaborator

I'm not sure about this --- adding two numbers of the same type generally gives that type back. Small integers are the only exceptions.

@timholy
Copy link
Member Author

timholy commented Sep 2, 2014

Fair enough. But these are small integers in disguise. Take an image of Ufixed8, with typical value near Ufixed8(0.5), and compute mean on it; you'll get back something like Ufixed8(0.5)/N, where N is the number of pixels. That's not very useful 😄.

@timholy
Copy link
Member Author

timholy commented Sep 4, 2014

Would you be happier if ::Ufixed8 + ::Ufixed8 returned a UfixedBase{Uint, 8}? That can be arranged.

@timholy
Copy link
Member Author

timholy commented Sep 5, 2014

FYI, this is the only item holding up a major overhaul of Images; I'm ready to hit the merge button otherwise.

I am sure you're busy doing some uber-cool stuff. If it would be easier on you, I can fork this package to some other name, and as it develops feed you pull requests to consider at your leisure.

@timholy
Copy link
Member Author

timholy commented Sep 5, 2014

Alternatively, you can add me as a collaborator to this repository (click the "Settings" icon), let me merge my crappy PRs, and then periodically review the things I've merged and suggest improvements.

@JeffBezanson
Copy link
Collaborator

That's a good idea; I added you as a collaborator.

JeffBezanson added a commit that referenced this pull request Sep 5, 2014
Use widening with addition and subtraction
@JeffBezanson JeffBezanson merged commit 991d795 into JuliaMath:master Sep 5, 2014
@timholy
Copy link
Member Author

timholy commented Sep 5, 2014

Thanks! And sorry to be a pest. Packages tend to move pretty quickly, because their issues are generally a lot smaller than the ones affecting the entire language 😄.

@timholy
Copy link
Member Author

timholy commented Sep 5, 2014

I'm going to tag a new release, unless you're already doing that.

@JeffBezanson
Copy link
Collaborator

Ok, go ahead. I appreciate the gentle reminders; makes it easier to remember what I need to do.

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.

2 participants