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 - basemath - ellrank.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1151 1234 93.3 %
Date: 2026-02-23 02:23:56 Functions: 108 115 93.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
hyperell_locally_soluble 0
lemma6 0
lemma6nf 0
lemma7 0
lemma7_aux 0
psquarenf 0
zpsol 0
nfhilbert 18
check_oncurve 36
ell2selmer_basis 42
ell2cover 48
ellrankinit 54
ellrank_get_nudur 84
quad_char 120
Z_quad_char 138
randS 162
elltwistpoint 192
repres 216
get_kerval 222
hilb2nf 222
locally_soluble 222
nf2selmer_quad 222
nf_hyperell_locally_soluble 222
matcassels 270
bestS 378
bnfselmer 378
nfV_factorbackmod 378
nfV_zm_factorback 378
prV_ZM_factorback 378
Q2_hyperell_lift 420
get_row 420
psquare2nf 438
den_remove 444
nfhilbertp 486
randu 486
nfhilbert0 498
cassels_oo_solve 516
cassels_oo_solve_i 516
gtoset_inplace 672
vecellabs 672
bnfselmerQ 708
ellrank 708
elltwistequation 720
makevbnf 744
ellrank_flag 756
nfC_prV_val 756
ell2selmer 762
ellLS2image 762
ellsearchtrivialpoints 762
kernorm 762
vbnf_discfactors 762
vecsmallbasis 762
first_core_prime 833
Z_factor_addprimes 1146
hyperell_lift 1227
elltwistpoints 1434
ell2pol 1506
matselmersign 1524
projratpointxz2 1529
Q2_hyperell_solve 2028
casselspairing 2028
enfsqrt 2028
quartic_H 2028
quartic_hessiandd 2028
vecnfsqrtmod 2028
Q2_hyperell_regpoint 2526
Q2_hyperell_solve_affine 2526
ZC_add_coeff 2748
liftselmer 2891
liftselmer_cover 3120
ellabs 3354
projratpointxz 3860
quartic_disc 3948
quartic_findunit 3948
to_ZX 4056
RgXV_homogenous_evaldeg 4650
_factorbackmod 4812
lemma7nf 4836
zpsolnf 4836
ZV_iseven 5064
nfsqrt 5340
nfsqrt_safe 5340
quarticinv_pol 5976
liftselmerinit 6011
qf_disc_fact 6173
quartic_minim_all 6173
redquadric 6173
RgVV_nb 7320
dim_selmer 7320
elllocalimage 7320
polrootsmodpn 7320
setlgall 7320
quartic_cubic 11220
veckpmodsquares 14640
ZC_shifti 15130
selmerbasis 15130
quartic_IJ 16097
basis 16438
tracematrix 16996
RgX_homogenous_evaldeg 17070
RgXV_cxeval 18540
Qp_hyperell_solve_odd 50820
affine_apply 50820
cassels_Qp_solve 52848
hyperell_local_solve 52848
selmersign 62514
ZV_isneg 78156
Qp_issquare 92232
hyperell_red 101640
_trace 101976
FpX_issquare 102288
hyperell_reg_point 104280
to_principal_unit 142044
kpmodsquares 680784
kpmodsquares1 1394358

Generated by: LCOV version 1.16