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 - base3.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29806-4d001396c7) Lines: 2061 2170 95.0 %
Date: 2024-12-22 09:08:28 Functions: 227 238 95.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Ideallist 11333
Idealstar 938
Idealstarmod 258006
Idealstarmod_i 258276
Idealstarprk 273
Q_mod_bid 14
RgC_to_nfC 149392
RgM_RgX_mul 1365
RgM_to_nfM 11177
RgX_to_nfX 29223
ZC_add1 169776
ZC_cxlog 1715174
ZC_nfval 19756032
ZC_nfvalrem 24032234
ZC_prdvd 1250207
ZC_sub1 70486
ZMV_ZCV_mul 1755701
ZM_ZMV_mul 518
ZM_ZX_mul 10366635
ZV_snf_gcd 1953048
_mul 356499
_mulii 1087260107
_nf_add 12672932
_nf_inv 53959
_nf_mul 15218661
_nf_neg 751655
_nf_red 3099304
_nf_s 11128
_sqr 987106
algtobasis 952883
apply_U 2156130
basistoalg 406283
bid_grp 258566
check_mod_factored 258919
check_nfelt 218947
checkarchp 134089
chineseinit_i 5774
chk_ind 36246
coltoalg 335859
concat_join 758904
cxlog_1 23115
cxlog_m1 532
ei_multable 39293
eltmul 327758
eltpow 465166
famatQ_to_famatZ 35
famat_abs 35
famat_cba 35
famat_cxlog 223285
famat_logembed 1309
famat_nfvalrem 420735
famat_norm 35
famat_sign 35
famat_strip2 258921
famat_to_nf_modideal_coprime 2622381
famat_zlog 1374184
famat_zlog_pr 1969487
famat_zlog_pr_coprime 196
get_C 608798
get_nf_field 227960
get_tab 40229358
gideallist 63
gpnfvalrem 15015
idealHNF_norm_pval 63
idealchinese 10709
idealfactorback 86368
ideallist 10563
ideallist0 11298
ideallistarch 14
ideallog 13769
ideallog_i 1383380
ideallog_units 84
ideallog_units0 227127
ideallogmod 1390063
idealprincipalunits 182
idealprincipalunits_i 169273
idealstar0 0
idealstarmod 112
idmul 72020
idmulred 56
idpow 87971
idpowred 413
indices_to_vec01 136891
init_zlog 380258
init_zlog_mod 1990751
is_chineseinit 11445
is_famat 74738712
isprfact 5305
join_arch 42
join_archunit 14
join_bid 469
join_bid_arch 42
join_ideal 268430
join_idealinit 469
join_unit 448
log_gen_arch 86268
log_gen_pr 413952
log_prk 2617513
log_prk1 1331588
log_prk_init 90236
log_prk_units 518
log_prk_units_init 49
low_prec 4612157
matalgtobasis 31946
matbasistoalg 2653
mulbytab 11213
multable 2751
nfC_multable_mul 57227
nfC_nf_mul 200022
nfM_det 14
nfM_inv 11114
nfM_ker 0
nfM_mul 10610
nfM_nfC_mul 206222
nfV_cxlog 97
nf_cxlog 1309603
nf_to_scalar_or_alg 4825810
nf_to_scalar_or_basis 162240821
nfadd 23476606
nfarchstar 567916
nfchecksigns 15111
nfchecksigns_i 80575
nfdiv 36322
nfdiveuc 259
nfdivrem 259
nfeltembed 728
nfeltembed_i 728
nfeltsign 125601
nfembed 0
nfembed_i 2140
nffactorback 265471
nfinv 240289
nfinvmodideal 189
nfispower 7712
nfissquare 1099
nflogembed 98707
nfmod 259
nfmul 36372775
nfmuli 4549420
nfmuli_ZC 9062032
nfmulmodideal 7292294
nfmulpowmodideal 4694975
nfnorm 223178
nfpolsturm 1904
nfpow 942856
nfpow_u 354711
nfpowmodideal 5846250
nfsetsigns 722652
nfsign 44170
nfsign_arch 1047328
nfsqr 8914806
nfsqri 4497033
nfsqri_ZC 7129098
nfsqrmodideal 2688842
nfsub 1815196
nftrace 21308
nfval 5633070
nfvalrem 3662670
num_positive 910284
oksigns 24891
order_update 560262
parse_embed 128226
pl_convert 985
pl_normalize 2660
pol_to_scalar_or_basis 4590350
polmod_nffix 169037
polmod_nffix2 169128
poltobasis 9766861
powp 973413
pr_basis_perm 43812
pr_equal 357
pr_init 5305
principal_units 169274
principal_units_relations 56774
rnfalgtobasis 1428
rnfbasistoalg 55104
rnfeltnorm 462
rnfelttrace 1043
sarch_get_F 608799
sarch_get_MI 608800
sarch_get_archp 1556147
sarch_get_cyc 486458
sarch_get_lambda 608798
scalar_logembed 15239
set_sign_mod_divisor 753915
setsigns_init 392077
split_U 257551
sprk_get_AgL2 0
sprk_get_L2 1213658
sprk_get_U2 1205074
sprk_get_cyc 3984137
sprk_get_expo 1969683
sprk_get_ff 2543569
sprk_get_gen 335923
sprk_get_gnf 318219
sprk_get_k 63
sprk_get_pr 2604019
sprk_get_prk 4917730
sprk_is_prime 2543595
sprk_log_gen_pr 2037
sprk_log_gen_pr2 105867
sprk_log_prk1 275855
sprk_log_prk1_2 404410
sprk_to_bid 63
sprkinit 426099
tablemul 0
tablemul_ei 11557
tablemul_ei_ej 22203
tablemulvec 2751
tablesqr 49090
to_RgX 119
vec01_to_indices 1094087
veclog_prk 497
vecsmall01_to_indices 2660
zidealij 237214
zidealstar 0
zidealstarinit 0
zidealstarinitgen 0
zkC_multable_mul 205721
zkVchinese1 237449
zk_ei_mul 23968430
zk_embed 74777
zk_inv 319227
zk_modHNF 7818277
zk_multable 10843821
zk_scalar_or_multable 5001471
zkadd 0
zkadd1 255436
zkchinese 0
zkchinese1 255467
zkchinese1init2 259
zkchineseinit 237203
zkmul 255434
zkmultable_capZ 1261706
zkmultable_inv 1580933
zksub 0
zksub1 255468
zlog 381552

Generated by: LCOV version 1.16