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) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31041-bd73e9fcdd) Lines: 95.0 % 2159 2051
Test Date: 2026-07-22 22:45:42 Functions: 95.4 % 237 226
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function 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 541
nfeltembed 735
nfeltembed_i 735
Idealstar 938
rnfelttrace 1050
pl_convert 1220
famat_logembed 1309
RgM_RgX_mul 1365
rnfalgtobasis 1428
sprk_log_gen_pr 2037
multable 2058
tablemulvec 2058
nfembed_i 2147
nfissquare 2163
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 11702
idealchinese 12779
is_chineseinit 13274
_nf_inv 13727
ideallog 13769
nfchecksigns 14506
gpnfvalrem 15015
scalar_logembed 15820
nftrace 22497
cxlog_1 23449
nfC_multable_mul 31375
matalgtobasis 33258
RgX_to_nfX 33750
oksigns 34237
chk_ind 37121
ei_multable 40121
nfdiv 40151
nfM_nfC_mul 48529
nfsign 53914
get_nf_field 54830
rnfbasistoalg 61264
principal_units_relations 69957
ZC_sub1 71777
idmul 72020
pr_basis_perm 72247
idpow 87971
idealfactorback 94611
log_prk_init 95417
zk_embed 104390
nfchecksigns_i 105795
nflogembed 107642
log_gen_arch 111991
RgC_to_nfC 112896
nfC_nf_mul 114287
nfeltsign 126175
parse_embed 129066
checkarchp 134104
indices_to_vec01 143702
sprk_log_gen_pr2 145845
polmod_nffix 181329
polmod_nffix2 181420
nfinv 188896
idealprincipalunits_i 194091
principal_units 194100
zkC_multable_mul 194459
_nf_neg 204392
ZC_add1 204721
nfnorm 216424
basistoalg 226047
famat_cxlog 227519
ideallog_units0 239957
join_ideal 268509
zkchineseinit 270320
split_U 270376
zkVchinese1 270569
Idealstarmod 270833
Idealstarmod_i 271114
bid_grp 271392
check_mod_factored 271761
famat_strip2 271767
zidealij 275318
sprk_log_prk1 275872
nffactorback 281075
zkadd1 301813
zkmul 301828
zkchinese1 301847
zksub1 301847
zk_inv 309335
sprk_get_gnf 318214
eltmul 350813
sprk_get_gen 370358
nfpow_u 370600
init_zlog 395953
_mul 398768
famat_nfvalrem 422947
sprk_log_prk1_2 444864
sprkinit 465698
setsigns_init 480624
log_gen_pr 484277
zlog 495227
eltpow 499812
sarch_get_cyc 512131
nfarchstar 658941
sarch_get_F 730424
sarch_get_lambda 730424
sarch_get_MI 730425
get_C 730426
order_update 739833
concat_join 758573
_nf_red 778543
nfsetsigns 864208
set_sign_mod_divisor 894852
powp 973434
algtobasis 975426
nfpow 1025577
_sqr 1061744
num_positive 1163999
nfsign_arch 1271064
ZC_prdvd 1294475
zkmultable_capZ 1330594
vec01_to_indices 1330886
nf_cxlog 1363181
famat_zlog 1424660
nfsub 1432749
ideallog_i 1521357
ideallogmod 1528039
sprk_get_U2 1532126
sprk_get_L2 1552255
zkmultable_inv 1639928
log_prk1 1686163
ZC_cxlog 1768971
sarch_get_archp 1863628
ZMV_ZCV_mul 1919860
nf_to_scalar_or_polmod 2134874
famat_zlog_pr 2143566
sprk_get_expo 2143762
init_zlog_mod 2157256
ZV_snf_gcd 2321590
apply_U 2781910
nfsqrmodideal 2813417
sprk_get_pr 2820300
famat_to_nf_modideal_coprime 2927839
sprk_is_prime 3041831
sprk_get_ff 3041832
log_prk 3124427
pol_to_scalar_or_basis 3480123
nfvalrem 3666399
_nf_add 3861892
_nf_mul 4502050
sprk_get_cyc 4570942
nfsqri 4705714
low_prec 4744911
nfmuli 4817722
nfmulpowmodideal 5090117
zk_scalar_or_multable 5358550
nfval 5614563
sprk_get_prk 5630544
nfsqr 6108660
nfpowmodideal 6490086
nf_to_scalar_or_alg 7169074
nfsqri_ZC 7349760
nfmulmodideal 7852469
zk_modHNF 8142385
nfmuli_ZC 8246987
poltobasis 9652545
ZM_ZX_mul 10291684
zk_multable 11379310
nfadd 14282389
ZC_nfval 20261500
nfmul 24580799
zk_ei_mul 24730079
ZC_nfvalrem 24763706
get_tab 40374135
is_famat 54069715
nf_to_scalar_or_basis 123900087
_mulii 1145605780

Generated by: LCOV version 2.0-1