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 30702-bddb8d6928) Lines: 2050 2158 95.0 %
Date: 2026-02-23 02:23:56 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
nfM_det 10
Q_mod_bid 12
ideallistarch 12
join_archunit 12
famatQ_to_famatZ 30
famat_abs 30
famat_cba 30
famat_norm 30
famat_sign 30
join_arch 36
join_bid_arch 36
log_prk_units_init 42
idmulred 48
gideallist 54
idealHNF_norm_pval 54
sprk_get_k 54
sprk_to_bid 54
ideallog_units 72
nfV_cxlog 73
to_RgX 86
idealstarmod 96
nfinvmodideal 148
idealprincipalunits 165
famat_zlog_pr_coprime 168
nfdiveuc 222
nfdivrem 222
nfmod 222
zkchinese1init2 222
Idealstarprk 234
pr_equal 306
rnfeltnorm 331
idpowred 352
join_unit 384
join_bid 402
join_idealinit 402
veclog_prk 426
ZM_ZMV_mul 444
log_prk_units 444
cxlog_m1 456
nfeltembed 568
nfeltembed_i 568
Idealstar 710
rnfelttrace 835
famat_logembed 954
RgM_RgX_mul 975
rnfalgtobasis 1020
nfissquare 1044
pl_convert 1046
nfembed_i 1630
multable 1665
tablemulvec 1665
nfpolsturm 1743
sprk_log_gen_pr 1746
nfM_mul 2368
pl_normalize 2490
vecsmall01_to_indices 2490
nfM_inv 2689
_nf_s 2699
matbasistoalg 2715
tablemul_ei 3404
tablemul_ei_ej 4669
isprfact 5252
pr_init 5252
RgM_to_nfM 5469
chineseinit_i 5654
mulbytab 5819
tablesqr 8239
ideallist 9054
ideallist0 9638
Ideallist 9668
nfispower 10026
idealchinese 10877
_nf_inv 10991
is_chineseinit 11145
ideallog 11801
nfchecksigns 12434
gpnfvalrem 12870
scalar_logembed 13384
nftrace 18240
cxlog_1 19700
nfC_multable_mul 24775
RgX_to_nfX 27807
oksigns 28267
matalgtobasis 28316
chk_ind 31377
nfdiv 33268
ei_multable 34525
nfM_nfC_mul 38827
get_nf_field 43894
nfsign 46203
rnfbasistoalg 52251
principal_units_relations 59868
ZC_sub1 61388
pr_basis_perm 61716
idmul 61728
idpow 75400
idealfactorback 80990
log_prk_init 81750
zk_embed 83475
nfchecksigns_i 84314
nfC_nf_mul 89392
nflogembed 91644
RgC_to_nfC 92548
log_gen_arch 95059
nfeltsign 107942
parse_embed 110247
checkarchp 114936
indices_to_vec01 122935
sprk_log_gen_pr2 124622
zkC_multable_mul 153234
polmod_nffix 155126
polmod_nffix2 155191
nfinv 160548
_nf_neg 164302
idealprincipalunits_i 166162
principal_units 166162
ZC_add1 175299
nfnorm 184534
famat_cxlog 193109
basistoalg 193339
ideallog_units0 205217
join_ideal 227898
split_U 231251
zkchineseinit 231506
Idealstarmod 231559
zkVchinese1 231728
Idealstarmod_i 231793
bid_grp 232063
check_mod_factored 232345
famat_strip2 232345
zidealij 235640
sprk_log_prk1 236448
nffactorback 239199
zkadd1 258458
zkchinese1 258458
zkmul 258458
zksub1 258458
zk_inv 263271
sprk_get_gnf 272628
eltmul 295810
sprk_get_gen 316892
nfpow_u 317616
init_zlog 338410
_mul 339137
famat_nfvalrem 362526
sprk_log_prk1_2 380845
setsigns_init 386323
sprkinit 398588
log_gen_pr 413904
zlog 423197
eltpow 423349
sarch_get_cyc 437868
nfarchstar 539026
get_C 585323
sarch_get_F 585323
sarch_get_MI 585323
sarch_get_lambda 585323
order_update 621599
_nf_red 624123
concat_join 646583
nfsetsigns 697024
set_sign_mod_divisor 722733
algtobasis 831065
powp 834354
nfpow 865575
_sqr 898534
num_positive 929123
nfsign_arch 1032082
vec01_to_indices 1082876
ZC_prdvd 1088177
zkmultable_capZ 1115414
nf_cxlog 1144517
famat_zlog 1199005
nfsub 1217366
ideallog_i 1281564
ideallogmod 1287287
sprk_get_U2 1306304
sprk_get_L2 1323382
zkmultable_inv 1378685
log_prk1 1437884
ZC_cxlog 1494018
sarch_get_archp 1503025
ZMV_ZCV_mul 1622210
famat_zlog_pr 1811901
sprk_get_expo 1812069
init_zlog_mod 1825191
nf_to_scalar_or_polmod 1828113
ZV_snf_gcd 1983296
nfsqrmodideal 2353191
apply_U 2372981
sprk_get_pr 2391599
famat_to_nf_modideal_coprime 2482631
sprk_get_ff 2580390
sprk_is_prime 2580444
log_prk 2651070
pol_to_scalar_or_basis 2960709
_nf_add 3118292
nfvalrem 3142590
_nf_mul 3632116
sprk_get_cyc 3883955
nfsqri 3955858
nfmuli 3995992
low_prec 4009615
nfmulpowmodideal 4267917
zk_scalar_or_multable 4548357
sprk_get_prk 4773496
nfval 4807006
nfsqr 5178126
nfpowmodideal 5454653
nf_to_scalar_or_alg 6034352
nfsqri_ZC 6220188
nfmulmodideal 6581804
zk_modHNF 6814874
nfmuli_ZC 6930091
poltobasis 8181266
ZM_ZX_mul 8696844
zk_multable 9628424
nfadd 12038139
ZC_nfval 17075614
nfmul 20800891
zk_ei_mul 20819878
ZC_nfvalrem 20840899
get_tab 34012755
is_famat 45845294
nf_to_scalar_or_basis 104696619
_mulii 888732741

Generated by: LCOV version 1.16