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 30316-0578a48613) Lines: 2062 2170 95.0 %
Date: 2025-06-04 09:19:51 Functions: 227 238 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 728
nfeltembed_i 728
Idealstar 938
rnfelttrace 1050
pl_convert 1213
nfissquare 1218
famat_logembed 1309
RgM_RgX_mul 1365
rnfalgtobasis 1428
multable 2037
sprk_log_gen_pr 2037
tablemulvec 2037
nfembed_i 2140
nfpolsturm 2163
nfM_mul 2934
pl_normalize 2996
vecsmall01_to_indices 2996
matbasistoalg 3003
nfM_inv 3339
_nf_s 3353
tablemul_ei 4158
tablemul_ei_ej 5834
isprfact 6218
pr_init 6218
RgM_to_nfM 6380
chineseinit_i 6687
mulbytab 7223
nfispower 7723
tablesqr 10356
ideallist 10563
ideallist0 11298
Ideallist 11333
idealchinese 12779
is_chineseinit 13267
_nf_inv 13727
ideallog 13769
nfchecksigns 14499
gpnfvalrem 15015
scalar_logembed 15239
nftrace 21302
cxlog_1 23097
oksigns 25078
RgX_to_nfX 29346
nfC_multable_mul 30766
matalgtobasis 33187
chk_ind 37121
nfdiv 38013
ei_multable 39553
nfsign 44352
pr_basis_perm 48230
nfM_nfC_mul 48529
get_nf_field 54816
principal_units_relations 56944
rnfbasistoalg 61264
ZC_sub1 70518
idmul 72020
zk_embed 74646
nfchecksigns_i 80825
idealfactorback 86516
log_gen_arch 87413
idpow 87971
log_prk_init 90236
nflogembed 98705
sprk_log_gen_pr2 110493
RgC_to_nfC 112448
nfC_nf_mul 112649
nfeltsign 126175
parse_embed 129059
checkarchp 134108
indices_to_vec01 137343
idealprincipalunits_i 169483
principal_units 169484
ZC_add1 169813
polmod_nffix 181329
polmod_nffix2 181420
nfinv 188581
zkC_multable_mul 194471
_nf_neg 204392
check_nfelt 218886
nfnorm 220291
famat_cxlog 223244
ideallog_units0 227392
zkchineseinit 237484
zidealij 237699
zkVchinese1 237731
zkadd1 255795
zkmul 255800
zkchinese1 255839
zksub1 255841
split_U 257811
Idealstarmod 258260
Idealstarmod_i 258533
bid_grp 258838
check_mod_factored 259178
famat_strip2 259179
nffactorback 265775
join_ideal 268451
sprk_log_prk1 275853
zk_inv 306011
sprk_get_gnf 318207
eltmul 329158
sprk_get_gen 336339
nfpow_u 346634
coltoalg 350436
_mul 355402
init_zlog 381618
zlog 382641
setsigns_init 390780
sprk_log_prk1_2 409028
log_gen_pr 420020
famat_nfvalrem 420735
sprkinit 426506
basistoalg 428662
eltpow 466865
sarch_get_cyc 486993
order_update 560236
nfarchstar 566542
sarch_get_MI 607469
sarch_get_F 607470
sarch_get_lambda 607470
get_C 607471
nfsetsigns 720654
set_sign_mod_divisor 751295
concat_join 758718
_nf_red 777913
num_positive 911257
nfpow 944146
algtobasis 970218
powp 973413
_sqr 981433
nfsign_arch 1051895
vec01_to_indices 1099138
sprk_get_U2 1212245
sprk_get_L2 1221024
zkmultable_capZ 1249412
ZC_prdvd 1250053
nf_cxlog 1309473
log_prk1 1339195
famat_zlog 1375789
ideallog_i 1385863
ideallogmod 1392541
nfsub 1432315
sarch_get_archp 1551548
zkmultable_inv 1555418
ZC_cxlog 1715076
ZMV_ZCV_mul 1758395
ZV_snf_gcd 1955984
famat_zlog_pr 1971724
sprk_get_expo 1971920
init_zlog_mod 1994857
apply_U 2187577
sprk_is_prime 2547910
sprk_get_ff 2547921
sprk_get_pr 2610900
log_prk 2621854
famat_to_nf_modideal_coprime 2624021
nfsqrmodideal 2687508
pol_to_scalar_or_basis 3470595
nfvalrem 3662741
_nf_add 3857230
sprk_get_cyc 3994490
nfsqri 4490834
_nf_mul 4496758
nfmuli 4544220
low_prec 4611754
nfmulpowmodideal 4703961
nf_to_scalar_or_alg 4841833
sprk_get_prk 4928933
zk_scalar_or_multable 4999293
nfval 5606149
nfpowmodideal 5855830
nfsqr 6075126
nfsqri_ZC 7102938
nfmulmodideal 7301049
zk_modHNF 7827975
nfmuli_ZC 8068047
poltobasis 9361421
ZM_ZX_mul 9982895
zk_multable 10795114
nfadd 14253115
ZC_nfval 19743866
zk_ei_mul 23936897
ZC_nfvalrem 24014594
nfmul 24547991
get_tab 39153796
is_famat 53886836
nf_to_scalar_or_basis 121481752
_mulii 1086667096

Generated by: LCOV version 1.16