Skip to content

conv and conv2 for type Integer #4855

merged 1 commit into from Dec 19, 2013

5 participants

The Julia Language member
wlbksy commented Nov 19, 2013

When conv and conv2 take Vector{Int} or Array{Int,2} as input,
return int instead of float

The Julia Language member

I wonder if a pure integer convolution implementation might be worthwhile.

See, e.g.,

cc: @stevengj

The Julia Language member

That certainly does look cool. I have no application for it myself, but the juiciness of the algorithms is very appealing.

The Julia Language member

Yes, number-theoretic transforms are cool, but my recollection is that floating-point arithmetic is usually faster than modular arithmetic over finite fields on modern general-purpose CPUs. NTTs avoid the possibility of roundoff errors, but roundoff errors grow so slowly with FFTs that just calling iround on the result will be exact until you reach huge sizes.

@JeffBezanson JeffBezanson merged commit b6b2e1f into JuliaLang:master Dec 19, 2013

1 check failed

Details default The Travis CI build failed
@wlbksy wlbksy deleted the wlbksy:conv branch Dec 19, 2013
The Julia Language member

Shouldn't these convert to the same integer type as the original arrays?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.