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 30556-bb9f5f8fc8) Lines: 2052 2158 95.1 %
Date: 2025-11-25 09:20:50 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
pl_convert 1124
nfissquare 1218
famat_logembed 1309
RgM_RgX_mul 1365
rnfalgtobasis 1428
multable 1512
tablemul_ei 1512
tablemulvec 1512
nfM_mul 1992
sprk_log_gen_pr 2037
nfpolsturm 2087
nfembed_i 2147
nfM_inv 2271
_nf_s 2285
pl_normalize 2871
vecsmall01_to_indices 2871
matbasistoalg 3046
tablemul_ei_ej 3484
mulbytab 4136
tablesqr 4765
RgM_to_nfM 5192
isprfact 5908
pr_init 5908
chineseinit_i 6363
_nf_inv 8392
ideallist 10563
ideallist0 11298
Ideallist 11333
nfispower 11702
idealchinese 11984
is_chineseinit 12539
ideallog 13769
nfchecksigns 14333
gpnfvalrem 15015
scalar_logembed 15813
nfC_multable_mul 20972
nftrace 21304
cxlog_1 22910
nfM_nfC_mul 25652
get_nf_field 29929
matalgtobasis 32724
RgX_to_nfX 32801
oksigns 34204
chk_ind 36779
nfdiv 39132
ei_multable 40216
nfsign 53899
rnfbasistoalg 55638
nfC_nf_mul 65900
principal_units_relations 69692
ZC_sub1 71714
idmul 72020
pr_basis_perm 72100
idpow 87971
RgC_to_nfC 89220
idealfactorback 94394
log_prk_init 95290
_nf_neg 98649
zk_embed 104113
nfchecksigns_i 105678
nflogembed 107555
log_gen_arch 111971
nfeltsign 125946
parse_embed 128761
checkarchp 134100
indices_to_vec01 143698
sprk_log_gen_pr2 145480
polmod_nffix 172322
polmod_nffix2 172413
nfinv 181582
zkC_multable_mul 189791
principal_units 193547
idealprincipalunits_i 193551
ZC_add1 204652
basistoalg 216485
nfnorm 220603
famat_cxlog 225012
ideallog_units0 238872
split_U 268354
join_ideal 268472
Idealstarmod 268813
Idealstarmod_i 269086
bid_grp 269356
zkchineseinit 269360
zkVchinese1 269603
famat_strip2 269718
check_mod_factored 269732
zidealij 274423
sprk_log_prk1 275852
nffactorback 278549
zkadd1 300750
zkmul 300782
zksub1 300825
zkchinese1 300828
zk_inv 306175
sprk_get_gnf 318207
eltmul 343781
sprk_get_gen 368880
nfpow_u 370380
_nf_red 376141
_mul 389277
init_zlog 392952
famat_nfvalrem 422947
sprk_log_prk1_2 444466
sprkinit 464091
setsigns_init 480184
log_gen_pr 483278
eltpow 492059
zlog 494076
sarch_get_cyc 509027
nfarchstar 656543
get_C 729745
sarch_get_F 729745
sarch_get_MI 729745
sarch_get_lambda 729745
order_update 739704
concat_join 758820
nfsetsigns 863640
set_sign_mod_divisor 894374
algtobasis 959641
powp 973413
nfpow 1010893
_sqr 1042135
num_positive 1162803
ZC_prdvd 1260388
nfsign_arch 1267863
zkmultable_capZ 1320803
vec01_to_indices 1327615
nfsub 1347010
nf_cxlog 1357889
famat_zlog 1422797
ideallog_i 1519470
ideallogmod 1526155
sprk_get_U2 1530827
sprk_get_L2 1551163
_nf_add 1623494
zkmultable_inv 1626974
log_prk1 1684260
ZC_cxlog 1763654
sarch_get_archp 1862564
ZMV_ZCV_mul 1916867
_nf_mul 1926019
nf_to_scalar_or_polmod 2133817
famat_zlog_pr 2140963
sprk_get_expo 2141159
init_zlog_mod 2151287
ZV_snf_gcd 2313430
apply_U 2777465
nfsqrmodideal 2807533
sprk_get_pr 2817332
pol_to_scalar_or_basis 2873232
famat_to_nf_modideal_coprime 2922585
sprk_get_ff 3037601
sprk_is_prime 3037634
log_prk 3119711
nfvalrem 3667159
sprk_get_cyc 4563611
nfsqri 4676199
low_prec 4734951
nfmuli 4791207
nfmulpowmodideal 5075273
zk_scalar_or_multable 5324281
nfsqr 5429643
nfval 5605570
sprk_get_prk 5623287
nfpowmodideal 6471918
nf_to_scalar_or_alg 7139520
nfsqri_ZC 7316212
nfmulmodideal 7831659
nfmuli_ZC 8037176
zk_modHNF 8118760
poltobasis 9500706
ZM_ZX_mul 10118326
zk_multable 11289613
nfadd 11929225
ZC_nfval 19777495
nfmul 21720512
ZC_nfvalrem 24269400
zk_ei_mul 24333645
get_tab 39729195
is_famat 49002098
nf_to_scalar_or_basis 113414448
_mulii 1066395956

Generated by: LCOV version 1.16