Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level - language - members.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 330 335 98.5 %
Date: 2026-02-23 02:23:56 Functions: 55 55 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* Copyright (C) 2000-2003  The PARI group.
       2             : 
       3             : This file is part of the PARI/GP package.
       4             : 
       5             : PARI/GP is free software; you can redistribute it and/or modify it under the
       6             : terms of the GNU General Public License as published by the Free Software
       7             : Foundation; either version 2 of the License, or (at your option) any later
       8             : version. It is distributed in the hope that it will be useful, but WITHOUT
       9             : ANY WARRANTY WHATSOEVER.
      10             : 
      11             : Check the License for details. You should have received a copy of it, along
      12             : with the package; see the file 'COPYING'. If not, write to the Free Software
      13             : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
      14             : 
      15             : #include "pari.h"
      16             : #include "paripriv.h"
      17             : 
      18             : /********************************************************************/
      19             : /**                                                                **/
      20             : /**                          MEMBER FUNCTIONS                      **/
      21             : /**                                                                **/
      22             : /********************************************************************/
      23             : INLINE int
      24        8256 : is_ell5(GEN x) {
      25             :   long lx;
      26        8256 :   if (typ(x) != t_VEC) return 0;
      27        7926 :   lx = lg(x);
      28        7926 :   return lx == 17 || (lx == 6 && !is_vec_t(typ(gel(x,2))));
      29             : }
      30        2976 : INLINE int is_ell(GEN x) {
      31        2976 :   long lx = lg(x);
      32        2976 :   return (typ(x) == t_VEC && lx == 17);
      33             : }
      34             : 
      35             : static void
      36        6653 : member_err(const char *s, GEN y) { pari_err_TYPE(s,y); }
      37             : 
      38             : GEN
      39         174 : member_e(GEN x)
      40             : {
      41         174 :   GEN y = get_prid(x);
      42         174 :   if (!y) member_err("e",x);
      43          12 :   return gel(y,3);
      44             : }
      45             : 
      46             : GEN
      47        7272 : member_f(GEN x)
      48             : {
      49        7272 :   GEN y = get_prid(x);
      50        7272 :   if (!y)
      51             :   {
      52         252 :     if (typ(x) == t_FFELT) return utoipos(FF_f(x));
      53         144 :     member_err("f",x);
      54             :   }
      55        7020 :   return gel(y,4);
      56             : }
      57             : 
      58             : GEN
      59       84642 : member_p(GEN x)
      60             : {
      61       84642 :   long t; GEN y = get_nf(x,&t);
      62       84642 :   if (y)
      63          36 :     return nf_get_ramified_primes(y);
      64       84606 :   switch(t)
      65             :   {
      66           6 :     case typ_GAL: return gal_get_p(x);
      67         168 :     case typ_ELL: switch(ell_get_type(x))
      68             :     {
      69         102 :       case t_ELL_Fp:
      70         102 :       case t_ELL_Fq: return ellff_get_p(x);
      71           6 :       case t_ELL_Qp: return ellQp_get_p(x);
      72          60 :       default: member_err("p",x);
      73             :     }
      74           6 :     case typ_MODPR: x = get_prid(x);
      75       84132 :     case typ_PRID: return pr_get_p(x);
      76           6 :     case typ_RNF: return rnf_get_ramified_primes(x);
      77             :   }
      78         294 :   switch(typ(x)) {
      79          54 :     case t_PADIC: return padic_p(x);
      80         162 :     case t_FFELT: return FF_p_i(x);
      81             :   }
      82          78 :   member_err("p",x);
      83           0 :   return NULL;
      84             : }
      85             : 
      86             : GEN
      87         180 : member_bid(GEN x)
      88             : {
      89         180 :   long t; (void)get_nf(x,&t);
      90         180 :   switch(t) {
      91          12 :     case typ_BNR: return bnr_get_bid(x);
      92          12 :     case typ_BIDZ:
      93          12 :     case typ_BID: return x;
      94             :   }
      95         156 :   member_err("bid",x);
      96           0 :   return NULL;
      97             : }
      98             : 
      99             : GEN
     100         174 : member_bnf(GEN x)
     101             : {
     102         174 :   long t; GEN y = get_bnf(x,&t);
     103         174 :   if (!y) {
     104         162 :     if (t == typ_ELL && ell_get_type(x) == t_ELL_NF)
     105             :     {
     106           0 :       y = ellnf_get_bnf(x);
     107           0 :       if (y) return y;
     108             :     }
     109         162 :     member_err("bnf",x);
     110             :   }
     111          12 :   return y;
     112             : }
     113             : 
     114             : GEN
     115         382 : member_nf(GEN x)
     116             : {
     117         382 :   long t; GEN y = get_nf(x,&t);
     118         382 :   if (!y) {
     119         316 :     if (t == typ_RNF) return gel(x,10);
     120         300 :     if (t == typ_ELL && ell_get_type(x) == t_ELL_NF) return ellnf_get_nf(x);
     121         144 :     member_err("nf",x);
     122             :   }
     123          66 :   return y;
     124             : }
     125             : 
     126             : /* integral basis */
     127             : GEN
     128         212 : member_zk(GEN x)
     129             : {
     130         212 :   long t; GEN y = get_nf(x,&t);
     131         212 :   if (!y)
     132             :   {
     133         150 :     switch(t)
     134             :     {
     135           6 :       case typ_Q:
     136           6 :         y = cgetg(3,t_VEC);
     137           6 :         gel(y,1) = gen_1;
     138           6 :         gel(y,2) = pol_x(varn(gel(x,1))); return y;
     139           6 :       case typ_RNF:
     140           6 :         return gel(x,7);
     141             :     }
     142         138 :     member_err("zk",x);
     143             :   }
     144          62 :   return nf_get_zk(y);
     145             : }
     146             : 
     147             : GEN
     148        2397 : member_disc(GEN x) /* discriminant */
     149             : {
     150        2397 :   long t; GEN y = get_nf(x,&t);
     151        2397 :   if (!y)
     152             :   {
     153        2325 :     switch(t)
     154             :     {
     155           6 :       case typ_Q  : return quad_disc(x);
     156          16 :       case typ_QFB: return qfb_disc(x);
     157        2136 :       case typ_ELL: return ell_get_disc(x);
     158          59 :       case typ_RNF: return rnf_get_disc(x);
     159             :     }
     160         108 :     member_err("disc",x);
     161             :   }
     162          72 :   return nf_get_disc(y);
     163             : }
     164             : 
     165             : GEN
     166        1832 : member_pol(GEN x) /* polynomial */
     167             : {
     168        1832 :   long t; GEN y = get_nf(x,&t);
     169        1832 :   if (!y)
     170             :   {
     171        1257 :     switch(t)
     172             :     {
     173           6 :       case typ_POL: return x;
     174           6 :       case typ_Q  : return deg1pol_shallow(gel(x,3), gel(x,2), varn(gel(x,1)));
     175         264 :       case typ_GAL: return gal_get_pol(x);
     176         141 :       case typ_RNF: return rnf_get_pol(x);
     177             :     }
     178         840 :     if (typ(x)==t_POLMOD) return gel(x,2);
     179         726 :     if (typ(x)==t_FFELT) return FF_to_FpXQ(x);
     180         102 :     member_err("pol",x);
     181             :   }
     182         575 :   return nf_get_pol(y);
     183             : }
     184             : 
     185             : GEN
     186         199 : member_polabs(GEN x)
     187             : {
     188         199 :   long t; (void)get_nf(x,&t);
     189         199 :   if (t != typ_RNF) member_err("pol",x);
     190          31 :   return rnf_get_polabs(x);
     191             : }
     192             : 
     193             : GEN
     194        7007 : member_mod(GEN x) /* modulus */
     195             : {
     196        7007 :   long t; (void)get_nf(x,&t);
     197        7007 :   switch(t) {
     198           6 :     case typ_GAL: return gal_get_mod(x);
     199        6030 :     case typ_BNR: return bnr_get_mod(x);
     200           0 :     case typ_GCHAR: return gchar_get_mod(x);
     201         539 :     case typ_BIDZ: return bid_get_ideal(x);
     202          12 :     case typ_BID: return bid_get_mod(x);
     203             :   }
     204         420 :   switch(typ(x))
     205             :   {
     206          60 :     case t_INTMOD: case t_POLMOD: case t_QUAD: break;
     207           6 :     case t_PADIC: return padic_pd(x);
     208         246 :     case t_FFELT: return FF_mod(x);
     209          84 :     case t_VEC:
     210          84 :       if (checkmf_i(x))
     211             :       {
     212           6 :         GEN T = mf_get_field(x), CHI = mf_get_CHI(x), P = mfcharpol(CHI);
     213           6 :         return (degpol(T) == 1)? P: (degpol(P) > 1? gmodulo(T, P): T);
     214             :       }
     215          78 :       else if (checkMF_i(x))
     216           6 :         return mfcharpol(MF_get_CHI(x));
     217          96 :     default: member_err("mod",x);
     218             :   }
     219          60 :   return gel(x,1);
     220             : }
     221             : 
     222             : GEN
     223         540 : member_sign(GEN x) /* signature */
     224             : {
     225         540 :   long t; GEN y = get_nf(x,&t);
     226         540 :   if (!y) member_err("sign",x);
     227          90 :   return gel(y,2);
     228             : }
     229             : GEN
     230         192 : member_r1(GEN x) { return gel(member_sign(x), 1); }
     231             : GEN
     232         174 : member_r2(GEN x) { return gel(member_sign(x), 2); }
     233             : 
     234             : GEN
     235         174 : member_normfu(GEN x) /* norm of fundamental unit */
     236             : {
     237         174 :   if (typ(x)!=t_VEC || lg(x)!=6 || typ(gel(x,1))!=t_INT || typ(gel(x,2))!=t_VEC)
     238         168 :     member_err("normfu",x);
     239           6 :   return gel(x,5);
     240             : }
     241             : 
     242             : GEN
     243         180 : member_index(GEN x)
     244             : {
     245         180 :   long t; GEN y = get_nf(x,&t);
     246         180 :   if (!y)
     247             :   {
     248         150 :     if (t == typ_RNF) return rnf_get_index(x);
     249         144 :     member_err("index",x);
     250             :   }
     251          30 :   return nf_get_index(y);
     252             : }
     253             : 
     254             : /* x assumed to be output by get_nf: ie a t_VEC with length 11 */
     255             : static GEN
     256         528 : nfmats(GEN x)
     257             : {
     258             :   GEN y;
     259         528 :   if (!x) return NULL;
     260          78 :   y = gel(x,5);
     261          78 :   if (typ(y) == t_VEC && lg(y) < 8) return NULL;
     262          78 :   return y;
     263             : }
     264             : 
     265             : GEN
     266         174 : member_t2(GEN x) /* T2 matrix */
     267             : {
     268         174 :   long t; GEN y = nfmats(get_nf(x,&t));
     269         174 :   if (!y) member_err("t2",x);
     270          24 :   return gram_matrix(gel(y,2));
     271             : }
     272             : 
     273             : GEN
     274         174 : member_diff(GEN x) /* different */
     275             : {
     276         174 :   long t; GEN y = nfmats(get_nf(x,&t));
     277         174 :   if (!y) member_err("diff",x);
     278          24 :   return gel(y,5);
     279             : }
     280             : 
     281             : GEN
     282         180 : member_codiff(GEN x) /* codifferent */
     283             : {
     284             :   long t;
     285         180 :   GEN T, d, Di, nf = get_nf(x,&t), y = nfmats(nf);
     286         180 :   if (!y) member_err("codiff",x);
     287          30 :   T = gel(y,4);
     288          30 :   Di = ZM_inv(T, &d); if (!d) return matid(lg(Di)-1);
     289          30 :   return RgM_Rg_div(ZM_hnfmodid(Di, d), d);
     290             : }
     291             : 
     292             : GEN
     293         198 : member_roots(GEN x) /* roots */
     294             : {
     295         198 :   long t; GEN y = get_nf(x,&t);
     296         198 :   if (!y)
     297             :   {
     298         174 :     if (t == typ_GAL) return gal_get_roots(x);
     299         168 :     if (t == typ_ELL)
     300          48 :       switch(ell_get_type(x))
     301             :       {
     302          18 :         case t_ELL_Qp: return mkcol( ellQp_root(x, ellQp_get_prec(x)) );
     303          18 :         case t_ELL_Q:
     304          18 :         case t_ELL_Rg: return ellR_roots(x, ellR_get_prec(x));
     305             :       }
     306         132 :     member_err("roots",x);
     307             :   }
     308          24 :   return nf_get_roots(y);
     309             : }
     310             : 
     311             : /* assume x output by get_bnf: ie a t_VEC with length 10 */
     312             : static GEN
     313         336 : check_RES(GEN x, const char *s)
     314             : {
     315         336 :   GEN y = gel(x,8);
     316         336 :   if (typ(y) != t_VEC || lg(y) < 4) member_err(s,x);
     317         336 :   return y;
     318             : }
     319             : 
     320             : /* y = get_bnf(x, &t) */
     321             : static GEN
     322       20529 : _member_clgp(GEN x, GEN y, long t) /* class group (3-component row vector) */
     323             : {
     324       20529 :   if (!y)
     325             :   {
     326       18256 :     switch(t)
     327             :     {
     328        3119 :       case typ_QUA: return mkvec3(gel(x,1), gel(x,2), gel(x,3));
     329        8856 :       case typ_BIDZ:
     330        8856 :       case typ_BID: return gel(x,2);
     331             :     }
     332        6281 :     if (typ(x)==t_VEC)
     333        6036 :       switch(lg(x))
     334             :       {
     335        5808 :         case 3: /* no gen */
     336        5808 :         case 4: return x;
     337             :       }
     338         473 :     member_err("clgp",x);
     339             :   }
     340        2273 :   if (t==typ_BNR) return gel(x,5);
     341         306 :   y = check_RES(y, "clgp"); return gel(y,1);
     342             : }
     343             : static GEN
     344       20529 : _check_clgp(GEN x, GEN y, long t)
     345       20529 : { GEN c = _member_clgp(x,y,t); checkabgrp(c); return c; }
     346             : GEN
     347         233 : member_clgp(GEN x)
     348         233 : { long t; GEN y = get_bnf(x,&t); return _check_clgp(x,y,t); }
     349             : 
     350             : GEN
     351         198 : member_reg(GEN x) /* regulator */
     352             : {
     353         198 :   long t; GEN y = get_bnf(x,&t);
     354         198 :   if (!y)
     355             :   {
     356         162 :     if (t == typ_QUA) return gel(x,4);
     357         156 :     member_err("reg",x);
     358             :   }
     359          36 :   if (t == typ_BNR) pari_err_IMPL("ray regulator");
     360          30 :   y = check_RES(y, "reg");
     361          30 :   return gel(y,2);
     362             : }
     363             : 
     364             : GEN
     365         216 : member_fu(GEN x) /* fundamental units */
     366             : {
     367         216 :   long t; GEN fu, y = get_bnf(x,&t);
     368         216 :   if (!y)
     369             :   {
     370         162 :     switch(t)
     371             :     {
     372           6 :       case typ_Q:
     373           6 :         x = quad_disc(x);
     374           6 :         return (signe(x)<0)? cgetg(1,t_VEC): quadunit(x);
     375             :     }
     376         156 :     member_err("fu",x);
     377             :   }
     378          54 :   if (t == typ_BNR) pari_err_IMPL("ray units");
     379          48 :   fu = bnf_get_fu_nocheck(y);
     380          48 :   if (typ(fu) == t_MAT)
     381             :   { /*missing units*/
     382          12 :     GEN SUnits = bnf_get_sunits(y);
     383          12 :     if (!SUnits) return gen_0;
     384          12 :     fu = bnf_build_units(y);
     385          12 :     fu = vecslice(fu, 2, lg(fu)-1); /* remove torsion unit */
     386             :   }
     387          48 :   return matbasistoalg(y, fu);
     388             : }
     389             : 
     390             : /* torsion units. return [w,e] where w is the number of roots of 1, and e a
     391             :  * polmod (or integer) generator */
     392             : GEN
     393         186 : member_tu(GEN x)
     394             : {
     395         186 :   long t; GEN bnf = get_bnf(x,&t), res = cgetg(3,t_VEC);
     396         186 :   if (!bnf)
     397             :   {
     398             :     GEN y;
     399         162 :     if (t != typ_Q) member_err("tu",x);
     400           6 :     y = quad_disc(x);
     401           6 :     if (signe(y) > 0 || abscmpiu(y,4) > 0) return mkvec2(gen_m1, gen_2);
     402             : 
     403           6 :     gel(res,1) = utoipos((itos(y) == -4)? 4: 6);
     404           6 :     gel(res,2) = gcopy(x);
     405             :   }
     406             :   else
     407             :   {
     408          24 :     GEN z = bnf_get_tuU(bnf);
     409          24 :     if (t == typ_BNR) pari_err_IMPL("ray torsion units");
     410          18 :     gel(res,1) = utoipos( bnf_get_tuN(bnf) );
     411          18 :     gel(res,2) = typ(z)==t_INT? gen_m1: basistoalg(bnf,z);
     412             :   }
     413          24 :   return res;
     414             : }
     415             : 
     416             : /* structure of (Z_K/m)^*, where x is an idealstarinit (with or without gen)
     417             :  * or a bnrinit (with or without gen) */
     418             : GEN
     419         174 : member_zkst(GEN x)
     420             : {
     421         174 :   long t; (void)get_nf(x,&t);
     422         174 :   switch(t)
     423             :   {
     424          12 :     case typ_BIDZ:
     425          12 :     case typ_BID: return bid_get_grp(x);
     426           6 :     case typ_BNR: {
     427           6 :       GEN bid = bnr_get_bid(x);
     428           6 :       if (typ(bid) == t_VEC && lg(bid) > 2) return bid_get_grp(bid);
     429             :     }
     430             :   }
     431         156 :   member_err("zkst",x);
     432             :   return NULL; /* LCOV_EXCL_LINE */
     433             : }
     434             : 
     435             : GEN
     436        2621 : member_no(GEN x) /* number of elements of a group (of type clgp) */
     437             : {
     438        2621 :   pari_sp av = avma;
     439        2621 :   long t; GEN y = get_bnf(x,&t);
     440        2621 :   if (t == typ_ELL) switch(ell_get_type(x))
     441             :   {
     442          12 :     case t_ELL_Fp:
     443          12 :     case t_ELL_Fq: return ellcard(x, NULL);
     444             :   }
     445        2609 :   x = _check_clgp(x,y,t);
     446        2477 :   return gc_const(av, abgrp_get_no(x));
     447             : }
     448             : 
     449             : GEN
     450       15829 : member_cyc(GEN x) /* cyclic decomposition (SNF) of a group (of type clgp) */
     451             : {
     452       15829 :   pari_sp av = avma;
     453       15829 :   long t; GEN y = get_bnf(x,&t);
     454       15829 :   if (t == typ_ELL) switch(ell_get_type(x))
     455             :   {
     456          12 :     case t_ELL_Fp:
     457          12 :     case t_ELL_Fq: return ellgroup(x, NULL);
     458             :   }
     459       15817 :   if (t == typ_GCHAR)
     460         162 :     return gchar_get_cyc(x);
     461       15655 :   x = _check_clgp(x,y,t);
     462       15518 :   return gc_const(av, abgrp_get_cyc(x));
     463             : }
     464             : 
     465             : /* SNF generators of a group (of type clgp), or generators of a prime
     466             :  * ideal */
     467             : GEN
     468        3886 : member_gen(GEN x)
     469             : {
     470             :   pari_sp av;
     471        3886 :   long t; GEN y = get_bnf(x,&t);
     472        3886 :   switch(t)
     473             :   {
     474           6 :     case typ_MODPR: x = get_prid(x);
     475        1746 :     case typ_PRID: return mkvec2(gel(x,1), gel(x,2));
     476          30 :     case typ_GAL: return gal_get_gen(x);
     477          60 :     case typ_ELL: return ellgenerators(x);
     478        1950 :     case typ_NULL:
     479        1950 :       if (typ(x)==t_FFELT) return FF_gen(x);
     480        1932 :       break;
     481             :   }
     482        2032 :   av = avma;
     483        2032 :   x = _check_clgp(x,y,t);
     484        1948 :   if (lg(x)!=4) member_err("gen",x);
     485        1936 :   return gc_const(av, abgrp_get_gen(x));
     486             : }
     487             : GEN
     488         390 : member_group(GEN x)
     489             : {
     490         390 :   long t; (void)get_nf(x,&t);
     491         390 :   if (t == typ_GAL) return gal_get_group(x);
     492         264 :   if (t == typ_ELL) return ellgroup0(x, NULL, 1);
     493         144 :   member_err("group",x);
     494             :   return NULL; /* LCOV_EXCL_LINE */
     495             : }
     496             : GEN
     497         174 : member_orders(GEN x)
     498             : {
     499         174 :   long t; (void)get_nf(x,&t);
     500         174 :   if (t == typ_GAL) return gal_get_orders(x);
     501         168 :   member_err("orders",x);
     502             :   return NULL; /* LCOV_EXCL_LINE */
     503             : }
     504             : 
     505             : GEN
     506        1656 : member_a1(GEN x)
     507             : {
     508        1656 :   if (!is_ell5(x)) member_err("a1",x);
     509        1512 :   return ell_get_a1(x);
     510             : }
     511             : 
     512             : GEN
     513        1650 : member_a2(GEN x)
     514             : {
     515        1650 :   if (!is_ell5(x)) member_err("a2",x);
     516        1506 :   return ell_get_a2(x);
     517             : }
     518             : 
     519             : GEN
     520        1650 : member_a3(GEN x)
     521             : {
     522        1650 :   if (!is_ell5(x)) member_err("a3",x);
     523        1506 :   return ell_get_a3(x);
     524             : }
     525             : 
     526             : GEN
     527        1650 : member_a4(GEN x)
     528             : {
     529        1650 :   if (!is_ell5(x)) member_err("a4",x);
     530        1506 :   return ell_get_a4(x);
     531             : }
     532             : 
     533             : GEN
     534        1650 : member_a6(GEN x)
     535             : {
     536        1650 :   if (!is_ell5(x)) member_err("a6",x);
     537        1506 :   return ell_get_a6(x);
     538             : }
     539             : 
     540             : GEN
     541         174 : member_b2(GEN x)
     542             : {
     543         174 :   if (!is_ell(x)) member_err("b2",x);
     544          24 :   return ell_get_b2(x);
     545             : }
     546             : 
     547             : GEN
     548         174 : member_b4(GEN x)
     549             : {
     550         174 :   if (!is_ell(x)) member_err("b4",x);
     551          24 :   return ell_get_b4(x);
     552             : }
     553             : 
     554             : GEN
     555         174 : member_b6(GEN x)
     556             : {
     557         174 :   if (!is_ell(x)) member_err("b6",x);
     558          24 :   return ell_get_b6(x);
     559             : }
     560             : 
     561             : GEN
     562         174 : member_b8(GEN x)
     563             : {
     564         174 :   if (!is_ell(x)) member_err("b8",x);
     565          24 :   return ell_get_b8(x);
     566             : }
     567             : 
     568             : GEN
     569         180 : member_c4(GEN x)
     570             : {
     571         180 :   if (!is_ell(x)) member_err("c4",x);
     572          30 :   return ell_get_c4(x);
     573             : }
     574             : 
     575             : GEN
     576         180 : member_c6(GEN x)
     577             : {
     578         180 :   if (!is_ell(x)) member_err("c6",x);
     579          30 :   return ell_get_c6(x);
     580             : }
     581             : 
     582             : GEN
     583         960 : member_j(GEN x)
     584             : {
     585         960 :   if (!is_ell(x)) member_err("j",x);
     586         810 :   return ell_get_j(x);
     587             : }
     588             : 
     589             : static int
     590         168 : ell_is_complex(GEN x)
     591         168 : { long t = ell_get_type(x); return t == t_ELL_Q || t == t_ELL_Rg; }
     592             : 
     593             : static long
     594          96 : ellnf_get_prec(GEN x) { return nf_get_prec(ellnf_get_nf(x)); }
     595             : 
     596             : GEN
     597         270 : member_omega(GEN x)
     598             : {
     599         270 :   if (!is_ell(x)) member_err("omega",x);
     600         120 :   if (ell_get_type(x)==t_ELL_NF)
     601          42 :     return ellnf_vecomega(x, ellnf_get_prec(x));
     602          78 :   if (!ell_is_complex(x)) pari_err_TYPE("omega [not defined over C]",x);
     603          48 :   return ellR_omega(x, ellR_get_prec(x));
     604             : }
     605             : 
     606             : GEN
     607         228 : member_eta(GEN x)
     608             : {
     609         228 :   if (!is_ell(x)) member_err("eta",x);
     610          78 :   if (ell_get_type(x)==t_ELL_NF)
     611          24 :     return ellnf_veceta(x, ellnf_get_prec(x));
     612          54 :   if (!ell_is_complex(x)) pari_err_TYPE("eta [not defined over C]",x);
     613          30 :   return ellR_eta(x, ellR_get_prec(x));
     614             : }
     615             : 
     616             : GEN
     617         216 : member_area(GEN x)
     618             : {
     619         216 :   if (!is_ell(x)) member_err("area",x);
     620          66 :   if (ell_get_type(x)==t_ELL_NF)
     621          30 :     return ellnf_vecarea(x, ellnf_get_prec(x));
     622          36 :   if (!ell_is_complex(x)) pari_err_TYPE("area [not defined over C]",x);
     623          12 :   return ellR_area(x, ellR_get_prec(x));
     624             : }
     625             : 
     626             : GEN
     627         246 : member_tate(GEN x)
     628             : {
     629             :   long prec;
     630         246 :   if (!is_ell(x)) member_err("tate",x);
     631          96 :   if (ell_get_type(x) != t_ELL_Qp)
     632          24 :     pari_err_TYPE("tate [not defined over Qp]",x);
     633          72 :   prec = ellQp_get_prec(x);
     634          72 :   return ellQp_Tate_uniformization(x, prec);
     635             : }

Generated by: LCOV version 1.16