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.1 lcov report (development 30573-61accf17c8) Lines: 2052 2158 95.1 %
Date: 2025-12-16 09:22:09 Functions: 226 237 95.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
idealstar0 0
nfM_ker 0
nfembed 0
sprk_get_AgL2 0
tablemul 0
zidealstar 0
zidealstarinit 0
zidealstarinitgen 0
zkadd 0
zkchinese 0
zksub 0
Q_mod_bid 14
ideallistarch 14
join_archunit 14
nfM_det 14
famatQ_to_famatZ 35
famat_abs 35
famat_cba 35
famat_norm 35
famat_sign 35
join_arch 42
join_bid_arch 42
log_prk_units_init 49
idmulred 56
gideallist 63
idealHNF_norm_pval 63
sprk_get_k 63
sprk_to_bid 63
ideallog_units 84
nfV_cxlog 97
idealstarmod 112
to_RgX 119
nfinvmodideal 175
famat_zlog_pr_coprime 196
idealprincipalunits 196
nfdiveuc 259
nfdivrem 259
nfmod 259
zkchinese1init2 259
Idealstarprk 273
pr_equal 357
idpowred 413
join_unit 448
rnfeltnorm 462
join_bid 469
join_idealinit 469
veclog_prk 497
ZM_ZMV_mul 518
log_prk_units 518
cxlog_m1 534
nfeltembed 735
nfeltembed_i 735
Idealstar 938
rnfelttrace 1050
nfissquare 1218
pl_convert 1220
famat_logembed 1309
RgM_RgX_mul 1365
rnfalgtobasis 1428
sprk_log_gen_pr 2037
multable 2058
tablemulvec 2058
nfembed_i 2147
nfpolsturm 2163
nfM_mul 2948
pl_normalize 2996
vecsmall01_to_indices 2996
matbasistoalg 3220
nfM_inv 3339
_nf_s 3353
tablemul_ei 4158
tablemul_ei_ej 5834
isprfact 6218
pr_init 6218
chineseinit_i 6687
RgM_to_nfM 6800
mulbytab 7300
tablesqr 10356
ideallist 10563
ideallist0 11298
Ideallist 11333
nfispower 11700
idealchinese 12779
is_chineseinit 13274
_nf_inv 13727
ideallog 13769
nfchecksigns 14506
gpnfvalrem 15015
scalar_logembed 15820
nftrace 21306
cxlog_1 23203
nfC_multable_mul 31375
RgX_to_nfX 32875
matalgtobasis 33209
oksigns 34199
chk_ind 37121
nfdiv 40279
ei_multable 40295
nfM_nfC_mul 48529
nfsign 53912
get_nf_field 54830
rnfbasistoalg 61264
principal_units_relations 69979
ZC_sub1 71778
idmul 72020
pr_basis_perm 72246
idpow 87971
idealfactorback 94656
log_prk_init 95437
zk_embed 104180
nfchecksigns_i 105794
nflogembed 107659
log_gen_arch 111983
RgC_to_nfC 112896
nfC_nf_mul 114287
nfeltsign 126175
parse_embed 129066
checkarchp 134099
indices_to_vec01 143700
sprk_log_gen_pr2 145837
polmod_nffix 181329
polmod_nffix2 181420
nfinv 188819
principal_units 194114
idealprincipalunits_i 194120
zkC_multable_mul 194465
_nf_neg 204392
ZC_add1 204725
nfnorm 220839
famat_cxlog 225481
basistoalg 226257
ideallog_units0 239951
join_ideal 268459
zkchineseinit 270317
split_U 270378
zkVchinese1 270575
Idealstarmod 270834
Idealstarmod_i 271105
bid_grp 271397
famat_strip2 271746
check_mod_factored 271748
zidealij 275366
sprk_log_prk1 275854
nffactorback 279466
zkadd1 301822
zkmul 301831
zkchinese1 301857
zksub1 301858
zk_inv 309581
sprk_get_gnf 318207
eltmul 350851
sprk_get_gen 370348
nfpow_u 370822
_mul 395968
init_zlog 395983
famat_nfvalrem 422947
sprk_log_prk1_2 444825
sprkinit 465711
setsigns_init 480399
log_gen_pr 484276
zlog 495225
eltpow 500049
sarch_get_cyc 512132
nfarchstar 658687
get_C 730053
sarch_get_F 730053
sarch_get_MI 730054
sarch_get_lambda 730054
order_update 739830
concat_join 758718
_nf_red 778543
nfsetsigns 863972
set_sign_mod_divisor 894614
algtobasis 972030
powp 973413
nfpow 1023796
_sqr 1056851
num_positive 1163237
nfsign_arch 1268054
ZC_prdvd 1295220
vec01_to_indices 1327869
zkmultable_capZ 1328646
nf_cxlog 1360004
famat_zlog 1424660
nfsub 1432749
ideallog_i 1521358
ideallogmod 1528040
sprk_get_U2 1532121
sprk_get_L2 1552253
zkmultable_inv 1638227
log_prk1 1686209
ZC_cxlog 1765531
sarch_get_archp 1863147
ZMV_ZCV_mul 1919856
nf_to_scalar_or_polmod 2133817
famat_zlog_pr 2143596
sprk_get_expo 2143792
init_zlog_mod 2157278
ZV_snf_gcd 2321670
apply_U 2782046
nfsqrmodideal 2812762
sprk_get_pr 2820322
famat_to_nf_modideal_coprime 2927919
sprk_get_ff 3041866
sprk_is_prime 3041874
log_prk 3124495
pol_to_scalar_or_basis 3474349
nfvalrem 3667153
_nf_add 3861892
_nf_mul 4502050
sprk_get_cyc 4571040
nfsqri 4700799
low_prec 4737526
nfmuli 4809879
nfmulpowmodideal 5087465
zk_scalar_or_multable 5352277
nfval 5610232
sprk_get_prk 5630561
nfsqr 6108513
nfpowmodideal 6487603
nf_to_scalar_or_alg 7167121
nfsqri_ZC 7344722
nfmulmodideal 7849417
zk_modHNF 8138923
nfmuli_ZC 8241901
poltobasis 9641893
ZM_ZX_mul 10266389
zk_multable 11368134
nfadd 14282340
ZC_nfval 20171112
nfmul 24580838
ZC_nfvalrem 24673357
zk_ei_mul 24693005
get_tab 40326907
is_famat 54068027
nf_to_scalar_or_basis 123874133
_mulii 1091487992

Generated by: LCOV version 1.16