Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
/* Copyright (C) 2000 The PARI group.12This file is part of the PARI/GP package.34PARI/GP is free software; you can redistribute it and/or modify it under the5terms of the GNU General Public License as published by the Free Software6Foundation; either version 2 of the License, or (at your option) any later7version. It is distributed in the hope that it will be useful, but WITHOUT8ANY WARRANTY WHATSOEVER.910Check the License for details. You should have received a copy of it, along11with the package; see the file 'COPYING'. If not, write to the Free Software12Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */1314/* output of get_nf and get_bnf */15enum {16typ_NULL = 0,17typ_POL,18typ_Q,19typ_QFB,20typ_NF,21typ_BNF,22typ_BNR,23typ_ELL, /* elliptic curve */24typ_QUA, /* quadclassunit */25typ_GAL, /* galoisinit */26typ_BID,27typ_BIDZ,28typ_PRID,29typ_MODPR,30typ_RNF31};3233/* types of algebras */34enum {35al_NULL = 0,36al_TABLE,37al_CSA,38al_CYCLIC39};4041/* models for elements of algebras */42enum {43al_INVALID = 0,44al_TRIVIAL,45al_ALGEBRAIC,46al_BASIS,47al_MATRIX48};4950/* idealtyp */51enum {52id_PRINCIPAL = 0,53id_PRIME,54id_MAT55};5657typedef struct {58GEN T, dT; /* defining polynomial (monic ZX), disc(T) */59GEN T0; /* original defining polynomial (ZX) */60GEN unscale; /* T = C*T0(x / unscale), rational */61GEN dK; /* disc(K) */62GEN index; /* [O_K : Z[X]/(T)] */63GEN basis; /* Z-basis of O_K (t_VEC of t_POL) */6465long r1; /* number of real places of K */66GEN basden; /* [nums(bas), dens(bas)] */67GEN dTP, dTE; /* (possibly partial) factorization of dT, primes / exponents */68GEN dKP, dKE; /* (possibly partial) factorization of dK, primes / exponents */69} nfmaxord_t;7071/* qfr3 / qfr5 */72struct qfr_data { GEN D, sqrtD, isqrtD; };7374/* various flags for nf/bnf routines */75enum {76nf_ORIG = 1,77nf_GEN = 1,78nf_ABSOLUTE = 2,79nf_FORCE = 2,80nf_ALL = 4,81nf_GENMAT = 4,82nf_INIT = 4,83nf_RAW = 8,84nf_RED = 8,85nf_PARTIALFACT = 16,86nf_ROUND2 = 64, /* obsolete */87nf_GEN_IF_PRINCIPAL = 51288};8990enum {91rnf_REL = 1,92rnf_COND = 293};9495/* LLL */96enum {97LLL_KER = 1, /* only kernel */98LLL_IM = 2, /* only image */99LLL_ALL = 4, /* kernel & image */100LLL_GRAM = 0x100,101LLL_KEEP_FIRST = 0x200,102LLL_INPLACE = 0x400,103LLL_COMPATIBLE = 0x800 /* attempt same behavior on 32/64bit kernels */104};105106/* HNF */107enum { hnf_MODID = 1, hnf_PART = 2, hnf_CENTER = 4 };108109/* for fincke_pohst() */110typedef struct FP_chk_fun {111GEN (*f)(void *,GEN);112/* f_init allowed to permute the columns of u and r */113GEN (*f_init)(struct FP_chk_fun*,GEN,GEN);114GEN (*f_post)(struct FP_chk_fun*,GEN,GEN);115void *data;116long skipfirst;117} FP_chk_fun;118119/* for ideallog / zlog */120typedef struct {121GEN bid;122GEN P, k;123GEN sprk; /* sprk[i] = sprkinit(P[i]^k[i])*/124GEN archp; /* archimedean part of conductor, in permutation form */125GEN mod;126GEN U; /* base change matrix blocks from (Z_K/P^k)^* and (Z/2)^#f_oo127* to bid.gen */128long hU; /* #bid.gen */129int no2; /* 1 iff fa2 = fa, i.e. no prime of norm 2 divide exactly bid.mod */130} zlog_S;131132133