Skip to content

Use widening with addition and subtraction - #12

Merged
JeffBezanson merged 1 commit into
JuliaMath:masterfrom
timholy:pull-request/854d8a8d
Sep 5, 2014
Merged

JeffBezanson merged 1 commit into
JuliaMath:masterfrom
timholy:pull-request/854d8a8d

Conversation

@timholy

@timholy timholy commented Sep 2, 2014

Copy link
Copy Markdown
Member

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
Copy Markdown
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

timholy commented Sep 2, 2014

Copy link
Copy Markdown
Member Author

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

timholy commented Sep 4, 2014

Copy link
Copy Markdown
Member Author

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

@timholy

timholy commented Sep 5, 2014

Copy link
Copy Markdown
Member Author

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

timholy commented Sep 5, 2014

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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

timholy commented Sep 5, 2014

Copy link
Copy Markdown
Member Author

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

timholy commented Sep 5, 2014

Copy link
Copy Markdown
Member Author

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

@JeffBezanson

Copy link
Copy Markdown
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