Bill Allombert on Wed, 04 Nov 2020 12:29:34 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: A tiny library over Pari/GP


On Sun, Oct 18, 2020 at 05:54:38PM +0000, lucas legrand wrote:
> Hi pari users,
> 
> I just published on github a repositery containing sources of a tiny C
> library builded over pari called libfact. It permits to compute
> objects related to generalized factorial functions introduced by
> Bhargava and co. More precisely, I originally worked on functions to
> compute regular basis for modules of integer-valued polynomials, but I
> finally end up with a coherent set of functions and i made a library
> out of it.
> 
> The most straightforward way to try it is probably to build the
> package and read the outed file "libfact.gp" within a gp-shell. It
> will install around 80 functions with help sections inside your
> gp-session. I tried to make a clear documentation with a lot of
> examples in gp-code to help the discovering.
> 
> I'm warning that this project should be considered as a beta beta and
> that it is probably highly bugish and for sure strongly optimizable.
> 
> The project on github : https://github.com/vilanele/libfact

Hello Lucas,

Thanks for the link!

If you need the sign of the fundamental unit of a real quadratic order,
there are better way to compute it than norm(quadunit(D)).
First it is -1 if D is prime and 1 if D has a prime factor = 3 mod 4.
Otherwise you can use 
bnfsignunit(bnfinit(quadpoly(D),1))

This can also be computed by comparing the class number with the 
narrow class number, but I do not know how to compute the narrow class
number with quadclassunit instead of bnrinit.

Also there is a C function smodis that you might want to use.

Cheers,
Bill.