wincnn icon indicating copy to clipboard operation
wincnn copied to clipboard

What are the polynomial points for F(4,5)???

Open victorygogogo opened this issue 6 years ago • 7 comments

victorygogogo avatar Jul 04 '19 02:07 victorygogogo

Because F(4,5) is the same degree as F(6,3), the same 7 interpolation points should work for both algorithms.

Generally for any F(m,r) with m+r-2 = n, you can try the same n interpolation points.

Following the example in the README, try

>>> from sympy import Rational
>>> wincnn.showCookToomFilter((0,1,-1,2,-2,Rational(1,2),-Rational(1,2)), 4, 5)

Hope that helps.

andravin avatar Jul 04 '19 04:07 andravin

thank you very much

victorygogogo avatar Jul 07 '19 07:07 victorygogogo

(0,1,-1,Rational(1,2),-Rational(1,2),2,-2 this interp can get the right result ?

victorygogogo avatar Jul 09 '19 02:07 victorygogogo

Yes, the order you list the points in does not matter .. and otherwise your list is the same as mine.

The usual caveat applies: the more interpolation points your algorithm uses, the greater the numeric error when computed with limited precision arithmetic.

Increasingly, I am only interested in the shortest convolution algorithms, because the latest hardware tends not to have enough memory bandwidth to make the larger algorithms efficient. Also F(2,3) can be accurate even with low precision arithmetic.

andravin avatar Jul 09 '19 02:07 andravin

so if use low precision data type such as float16 ,f(2,3) can ignore the error ?

victorygogogo avatar Jul 10 '19 13:07 victorygogogo

Yes, F(2,3) should work well with float16 precision, but as always, actually measure the error compared to a high precision direct convolution for your application!

andravin avatar Jul 10 '19 22:07 andravin

How to compute F(7,3)?

Shipley1105 avatar Jan 02 '24 11:01 Shipley1105