-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm looking for an algorithm (or code) to help me compute the inverse a polynomial, I need it for implementing NTRUEncrypt. An algorithm that is easily understandable is what I prefer, there are pseudo-codes for doing this, but they are confusing and difficult to implement, furthermore I can not really…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have had that problem before and I couldn't solve it how do I fit a 2d surface z=f(x,y) with a polynomial in numpy (full crossterms).
Thanks in advance,
Wolfgang
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello everyone.
I'm implementing the NTRUEncrypt algorithm, according to an NTRU tutorial, a polynomial f has an inverse g such that f*g=1 mod x, basically the polynomial multiplied by its inverse reduced modulo x gives 1. I get the concept but in an example they provide, a polynomial f = -1 + X…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello all. I was wondering if anyone could tell me how to implement line 45 of the following pseudo-code.
Require: the polynomial to invert a(x), N, and q.
1: k = 0
2: b = 1
3: c = 0
4: f = a
5: g = 0 {Steps 5-7 set g(x) = x^N - 1.}
6: g[0] = -1
7: g[N] = 1
8: loop
9: while f[0] = 0 do
10: …
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to use operator overloading to define the basic operations (+,-,*,/) for my polynomial class but when i run the program it crashes and my computer frozes.
Update3
Ok i successfully done the first two operations(+,-). Now at multiplication, after multiplying each term of the first polynomial…
>>> More