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 30007-407ab607e8) Lines: 2062 2170 95.0 %
Date: 2025-02-20 09:19:49 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
nfissquare 1218
pl_convert 1249
famat_logembed 1309
RgM_RgX_mul 1365
rnfalgtobasis 1428
multable 1988
tablemulvec 1988
sprk_log_gen_pr 2037
nfembed_i 2140
nfpolsturm 2163
nfM_mul 2920
matbasistoalg 2975
pl_normalize 3003
vecsmall01_to_indices 3003
nfM_inv 3325
_nf_s 3339
tablemul_ei 4186
tablemul_ei_ej 5834
isprfact 6246
pr_init 6246
RgM_to_nfM 6310
chineseinit_i 6715
mulbytab 7139
nfispower 7738
tablesqr 10384
ideallist 10563
ideallist0 11298
Ideallist 11333
idealchinese 12856
is_chineseinit 13330
_nf_inv 13713
ideallog 13769
gpnfvalrem 15015
scalar_logembed 15239
nfchecksigns 15536
nftrace 21303
cxlog_1 23126
oksigns 25101
RgX_to_nfX 29431
nfC_multable_mul 30717
matalgtobasis 33153
chk_ind 37121
nfdiv 37844
ei_multable 39641
pr_basis_perm 43813
nfsign 44352
nfM_nfC_mul 48543
get_nf_field 54802
principal_units_relations 56812
rnfbasistoalg 61264
ZC_sub1 70496
idmul 72020
zk_embed 74874
nfchecksigns_i 80970
log_gen_arch 86267
idealfactorback 86581
idpow 87971
log_prk_init 90257
nflogembed 98728
sprk_log_gen_pr2 105868
nfC_nf_mul 112187
RgC_to_nfC 112260
nfeltsign 126175
parse_embed 129059
checkarchp 134092
indices_to_vec01 136893
idealprincipalunits_i 169309
principal_units 169310
ZC_add1 169780
polmod_nffix 181671
polmod_nffix2 181762
nfinv 188594
zkC_multable_mul 194482
_nf_neg 204455
check_nfelt 218961
famat_cxlog 223286
nfnorm 223600
ideallog_units0 227156
zkchineseinit 237231
zidealij 237283
zkVchinese1 237495
zkadd1 255439
zkmul 255464
zkchinese1 255513
zksub1 255513
split_U 257580
Idealstarmod 258053
Idealstarmod_i 258323
bid_grp 258604
famat_strip2 258951
check_mod_factored 258954
nffactorback 265705
join_ideal 268493
sprk_log_prk1 275852
zk_inv 306448
sprk_get_gnf 318207
eltmul 329507
sprk_get_gen 335968
nfpow_u 342791
coltoalg 350733
_mul 356390
init_zlog 380286
zlog 381590
setsigns_init 393709
sprk_log_prk1_2 404400
log_gen_pr 413995
famat_nfvalrem 420735
sprkinit 426158
basistoalg 428887
eltpow 467148
sarch_get_cyc 486542
order_update 560309
nfarchstar 569373
get_C 610285
sarch_get_F 610285
sarch_get_lambda 610285
sarch_get_MI 610286
nfsetsigns 724254
set_sign_mod_divisor 755307
concat_join 758454
_nf_red 778130
num_positive 914097
nfpow 945285
algtobasis 968695
powp 973413
_sqr 985890
nfsign_arch 1049328
vec01_to_indices 1096116
sprk_get_U2 1205130
sprk_get_L2 1213728
zkmultable_capZ 1249503
ZC_prdvd 1251853
nf_cxlog 1309615
log_prk1 1331767
famat_zlog 1374239
ideallog_i 1383437
ideallogmod 1390118
nfsub 1430740
zkmultable_inv 1555949
sarch_get_archp 1559271
ZC_cxlog 1715187
ZMV_ZCV_mul 1755800
ZV_snf_gcd 1953203
famat_zlog_pr 1969593
sprk_get_expo 1969789
init_zlog_mod 1990871
apply_U 2156440
sprk_get_ff 2543759
sprk_is_prime 2543785
sprk_get_pr 2604143
log_prk 2617742
famat_to_nf_modideal_coprime 2622607
nfsqrmodideal 2688498
pol_to_scalar_or_basis 3470622
nfvalrem 3662743
_nf_add 3857979
sprk_get_cyc 3984451
_nf_mul 4497710
nfsqri 4497898
nfmuli 4542124
low_prec 4612143
nfmulpowmodideal 4696823
nf_to_scalar_or_alg 4845579
sprk_get_prk 4918016
zk_scalar_or_multable 5002136
nfval 5606141
nfpowmodideal 5848331
nfsqr 6070062
nfsqri_ZC 7110108
nfmulmodideal 7293792
zk_modHNF 7822194
nfmuli_ZC 8072197
poltobasis 9366188
ZM_ZX_mul 9970025
zk_multable 10803355
nfadd 14245758
ZC_nfval 19748759
zk_ei_mul 23955453
ZC_nfvalrem 24023970
nfmul 24538763
get_tab 39184664
is_famat 53874351
nf_to_scalar_or_basis 121443286
_mulii 1087562612

Generated by: LCOV version 1.16