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 - base2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30640-c2c58e18c5) Lines: 2227 2369 94.0 %
Date: 2026-01-27 08:51:18 Functions: 174 178 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FqV_to_nfV 0
ZpX_primedec 0
errprime 0
rnfsimplifybasis 0
nfmodprinit 7
rnfhnfbasis 7
rnfisfree 7
rnfdet 14
FqX_non_root 21
rnfbasis 21
rnfsteinitz 28
gen_if_principal 35
poldiscfactors 42
RgV_nffix 49
get_module 63
nfidealdet1 63
compositum 65
nfmodprinit0 77
nfmodprlift 77
rnfdiscf 77
rnfdedekind 91
Z_fac 197
QXQV_to_FpM 203
checkmodpr 210
nfreducemodpr 210
get_coprimes 287
nfmodpr 350
idealprimedec_degrees 371
fix_PE 505
nfcompositum_lambda 511
ZpX_monic_factor 546
rnfdisc_factored 838
expo_is_squarefree 889
ZpX_round4 896
nfbasis 896
ZpX_monic_factor_squarefree 1155
rnfjoinmodules 1329
triv_order 1513
RgX_to_algX 1606
nfX_to_monic 1620
ffdegree 1691
p_is_prime 1738
nfM_to_FqM 1806
rnfjoinmodules_i 2045
compositum2 2081
update_fact 2360
FqM_to_nfM 2802
rnfallbase 3141
get_d 3190
fact_from_factors 3416
minval 3470
rnfmaxord 4046
fill 4090
nfX_sub 4102
rnfdedekind_i 4130
_msqr 4158
pr_factorback 4277
pr_factorback_scal 4277
modpr_genFq 4508
rnfeltid_powmod 5306
FpX_radical 5543
idealprimedec_galois 6378
nfXisintegral 7257
ideal_is1 7455
nfpolisintegral 8079
nfpolisintegral_i 8079
nfX_to_FqX 9331
FqX_to_nfX 10112
polcompositum0 11732
safe_Z_pvalrem 12215
nfcompositum 12285
_sqr 14078
nfXQ_mul 14147
nfX_rem 14147
indexpartial 16353
nfX_mul 18249
nfdisc 19153
zk_to_Fq_init 22501
compositum_fix 24373
nf_pV_to_prVV 26590
lift_to_zk 31641
nfisintegral 31767
nf_pV_to_prV 37093
redelt 37370
testc2 37370
redelt_i 47638
testb2 48981
ZX_rescale_inv 56090
ZpX_sylvester_echelon 73886
diag_denom 80074
nfmaxord 82196
pol_min 84313
get_powers 97813
init_norm 117193
pradical 117196
get_LV 117197
primedec_end 117197
get_modpr 137753
ZpX_disc_val 164936
nfV_to_FqV 167410
zkmodprinit 170674
fnz 180190
uniformizer 193680
loop 198641
Zlx_gcd 229237
update_phi 232411
Fp_basis 235694
compmod 236013
Decomp 237605
ZpX_gcd 237610
get_gamma 241753
get_pr 273715
RgX_nffix 289194
get_g 293047
ei_msqr_mod 306605
get_norm 318493
is_uniformizer 318493
progress 330701
split_char 384737
ZpM_hnfmodid 404178
maxord_i 405073
getprime 464276
idealprimedec_limit_norm 465388
QpXV_denom 474620
get_partial_order_as_pols 474620
pow_ei_mod_p 493449
vstar 521018
get_nu 530792
dbasis 537757
mul_intersect 549379
newtoncharpoly 563278
manage_cache 567985
mycaract 568014
newtonsums 568016
diag_denomval 595734
sqr_mod 640307
nfdiscfactors 644779
maxord_disc 663915
setPE 726898
poldiscfactors_i 727700
set_disc 746067
get_maxord 746119
nfmaxord_check_args 746125
ZpX_reduced_resultant_fast 763353
pr_anti_uniformizer 764784
ZpX_reduced_resultant 822249
Rg_nffix 822537
hnf_Znproj 871635
get_prid 939477
modprinit 955199
idealprimedec 1188105
zx_z_div 1386568
ZX_Dedekind 1392163
maxord 1392165
QpX_remove_denom 1449780
Flx_radical 1452104
Flx_checkdeflate 1452108
QpX_denom 2381852
idealprimedec_limit_f 2406408
primedec_aux 2413153
update_den 3003272
Fq_to_nf 3030801
ZpX_resultant_val 3079314
ZpX_resultant_val_i 3124140
nf_to_Fq_init 3338768
modpr_TAU 3339965
to_ff_init 3361267
idealprimedec_kummer 3436510
mk_pr 3718280
init_m 3842626
Zlx_sylvester_echelon 4110091
ok_modpr 4194084
zk_to_Fq 6297434
nf_to_Fq 12592639
gc_nf_to_Fq 13762386
nf_to_Fq_i 13762892
checkprid 17620785
checkprid_i 22128083

Generated by: LCOV version 1.16