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 30072-2ccdc2326c) Lines: 2062 2170 95.0 %
Date: 2025-03-12 09:19:58 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 189
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 1995
tablemulvec 1995
sprk_log_gen_pr 2037
nfembed_i 2140
nfpolsturm 2163
nfM_mul 2934
matbasistoalg 2975
pl_normalize 2996
vecsmall01_to_indices 2996
nfM_inv 3339
_nf_s 3353
tablemul_ei 4158
tablemul_ei_ej 5834
isprfact 6218
pr_init 6218
RgM_to_nfM 6338
chineseinit_i 6687
mulbytab 7139
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 21301
cxlog_1 23147
oksigns 25127
RgX_to_nfX 29416
nfC_multable_mul 30724
matalgtobasis 33104
chk_ind 37121
nfdiv 38022
ei_multable 39553
pr_basis_perm 43813
nfsign 44352
nfM_nfC_mul 48529
get_nf_field 54816
principal_units_relations 56811
rnfbasistoalg 61264
ZC_sub1 70515
idmul 72020
zk_embed 74952
nfchecksigns_i 80958
log_gen_arch 86262
idealfactorback 86566
idpow 87971
log_prk_init 90258
nflogembed 98728
sprk_log_gen_pr2 105868
nfC_nf_mul 112320
RgC_to_nfC 112322
nfeltsign 126175
parse_embed 129059
checkarchp 134094
indices_to_vec01 136894
idealprincipalunits_i 169305
principal_units 169306
ZC_add1 169823
polmod_nffix 181329
polmod_nffix2 181420
nfinv 188609
zkC_multable_mul 194492
_nf_neg 204392
check_nfelt 219043
nfnorm 220412
famat_cxlog 223286
ideallog_units0 227164
zkchineseinit 237270
zidealij 237286
zkVchinese1 237506
zkadd1 255471
zkmul 255488
zkchinese1 255524
zksub1 255526
split_U 257587
Idealstarmod 258057
Idealstarmod_i 258329
bid_grp 258599
famat_strip2 258947
check_mod_factored 258967
nffactorback 265876
join_ideal 268450
sprk_log_prk1 275853
zk_inv 306137
sprk_get_gnf 318207
eltmul 329749
sprk_get_gen 335998
nfpow_u 342239
coltoalg 350380
_mul 355835
init_zlog 380292
zlog 381669
setsigns_init 390852
sprk_log_prk1_2 404405
log_gen_pr 413993
famat_nfvalrem 420735
sprkinit 426178
basistoalg 428522
eltpow 467558
sarch_get_cyc 486536
order_update 559966
nfarchstar 566504
sarch_get_lambda 607705
get_C 607706
sarch_get_F 607706
sarch_get_MI 607707
nfsetsigns 721644
set_sign_mod_divisor 752703
concat_join 758166
_nf_red 777913
num_positive 911900
nfpow 945065
algtobasis 968393
powp 973413
_sqr 982391
nfsign_arch 1052135
vec01_to_indices 1098930
sprk_get_U2 1205115
sprk_get_L2 1213708
zkmultable_capZ 1249376
ZC_prdvd 1251539
nf_cxlog 1309514
log_prk1 1331757
famat_zlog 1374115
ideallog_i 1383368
ideallogmod 1390048
nfsub 1430803
sarch_get_archp 1554088
zkmultable_inv 1555505
ZC_cxlog 1715066
ZMV_ZCV_mul 1755738
ZV_snf_gcd 1953038
famat_zlog_pr 1968826
sprk_get_expo 1969022
init_zlog_mod 1990808
apply_U 2156419
sprk_is_prime 2543420
sprk_get_ff 2543425
sprk_get_pr 2603364
log_prk 2617406
famat_to_nf_modideal_coprime 2621806
nfsqrmodideal 2688009
pol_to_scalar_or_basis 3470630
nfvalrem 3662740
_nf_add 3857230
sprk_get_cyc 3983733
nfsqri 4492921
_nf_mul 4496758
nfmuli 4540524
low_prec 4611784
nfmulpowmodideal 4697513
nf_to_scalar_or_alg 4841793
sprk_get_prk 4916911
zk_scalar_or_multable 4999877
nfval 5606144
nfpowmodideal 5848553
nfsqr 6069430
nfsqri_ZC 7105116
nfmulmodideal 7295010
zk_modHNF 7824464
nfmuli_ZC 8069730
poltobasis 9362151
ZM_ZX_mul 9966066
zk_multable 10797659
nfadd 14243903
ZC_nfval 19749556
zk_ei_mul 23941734
ZC_nfvalrem 24020655
nfmul 24537693
get_tab 39163227
is_famat 53873009
nf_to_scalar_or_basis 121428890
_mulii 1086638665

Generated by: LCOV version 1.16