-
Notifications
You must be signed in to change notification settings - Fork 243
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
Thoughts on the API #76
Comments
On 23 May 2014 18:19, Julian Ospald notifications@github.com wrote:
Algorithms in flint should be fine with trailing zero coefficients. But we
Welcome to C! You might investigate the valgrind program. And yes, it is a design As I say, things will be easier when we have asserts throughout. But Bill.
|
Exactly. One of the polynomials might have a much lesser degree and I need to compare coefficients in both. The comparison now is 2 steps (as in: assume "0"-coefficient if fmpz_poly_get_coeff_ptr() returns a NULL-pointer). The same goes for setting coefficients in the blue, without knowing the whole polynomial yet. Setting trailing zero-coefficients via the fmpz_poly_set_coeff_* functions will just be ignored, or I did something wrong.
Already using it :) |
On 23 May 2014 19:32, Julian Ospald notifications@github.com wrote:
Possibly. The higher the index, the higher the degree of the coefficient. All functions in flint assume polynomials are normalised (unless noted
|
Thanks for the hints. Another convenience function that I think would be nice to have upstream is:
|
On 24 May 2014 22:19, Julian Ospald notifications@github.com wrote:
If we look at the interface of GMP for example, there are two situations
We could (and might) add fmpz_invmod_ui. But it doesn't really fit into Do you have a specific use case in mind? Bill.
|
I guess it is just for convenience. I use it for the NTRUEncrypt algorithms where I operate on the coefficients with the NTRU parameters which are very small. Not sure if it makes sense to convert them to fmpz_t types. |
I am currently using flint for a small fun crypto project which involves a lot of polynomial arithmetic, modulus stuff and euclidean algorithm.
There are a few things in the flint API that confuses me. Please bear with me in case I was just too stupid to figure out something:
But what bothers me most is the error handling. Did I miss a section in the manual and there is some sort of global variable I can check? Or is this just a design decision of debugging segfaults instead of functions returning error codes?
Anyway, probably the most advanced library in this field. Pretty awesome.
The text was updated successfully, but these errors were encountered: