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 - headers - pariinl.h (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29806-4d001396c7) Lines: 1437 1578 91.1 %
Date: 2024-12-22 09:08:28 Functions: 647 717 90.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 8081729
F2m_copy 197769
F2m_flip 1559291
F2m_set 798
F2v_clear 12150381
F2v_coeff 660378711
F2v_copy 4487
F2v_ei 42
F2v_flip 1559291
F2v_set 101399440
F2v_to_F2x 38054
F2xX_shift 0
F2x_clear 12150377
F2x_coeff 667013446
F2x_copy 60749591
F2x_div 1568888
F2x_equal 4691587
F2x_equal1 2871440
F2x_flip 1559291
F2x_renormalize 115675341
F2x_set 124877509
F2xqX_div 33243
F3m_coeff 3206523
F3m_copy 0
F3m_set 0
Flm_copy 6246132
Flm_row 8467907
Flv_copy 2505955
Flx_constant 137726
Flx_copy 173657837
Flx_div 1988792
Flx_div_pre 21358818
Flx_equal1 10179463
Flx_lead 964131
Flx_mulu 1086864
FlxqX_div 0
FlxqX_div_pre 165537
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 4546
FpXQX_renormalize 4707434
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 853152
FpXY_Fq_evaly 20587
FpX_div 5427954
FpX_renormalize 142666959
Fp_add 174514302
Fp_addmul 11285347
Fp_center 75539552
Fp_center_i 13855552
Fp_div 1614754
Fp_divu 1898876
Fp_double 21034975
Fp_halve 252241
Fp_inv 36333342
Fp_invsafe 1095734
Fp_mul 181898830
Fp_muls 17780
Fp_mulu 73136360
Fp_neg 28670806
Fp_red 80053326
Fp_sqr 64293258
Fp_sub 147896401
FqXQ_add 0
FqXQ_div 0
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 22766
FqXQ_pow 0
FqXQ_sqr 0
FqXQ_sub 0
FqX_Fp_mul 568197
FqX_Fq_mul 427368
FqX_add 127694
FqX_ddf 7
FqX_degfact 47786
FqX_deriv 723681
FqX_div 40284
FqX_div_by_X_x 71939
FqX_divrem 0
FqX_extgcd 442871
FqX_factor 141723
FqX_factor_squarefree 7
FqX_gcd 693364
FqX_get_red 6090
FqX_halfgcd 0
FqX_halve 19411
FqX_integ 0
FqX_mul 368585
FqX_mulu 21942
FqX_neg 24956
FqX_normalize 4872
FqX_powu 1295
FqX_red 25354
FqX_rem 37743
FqX_roots 7273
FqX_sqr 71855
FqX_sub 68607
FqX_to_mod 175
FqXn_exp 0
FqXn_expint 6590
FqXn_inv 7126
FqXn_mul 263403
FqXn_sqr 0
Fq_red 3424553
Fq_to_FpXQ 110255
GENbinbase 927166145
QV_isscalar 64689832
Q_abs 7793377
Q_abs_shallow 171565
Qtoss 19838
R_abs 0
R_abs_shallow 13083
RgC_fpnorml2 618706
RgC_gtofp 33676434
RgC_gtomp 574
RgM_dimensions 9406250
RgM_fpnorml2 22183
RgM_gtofp 8174886
RgM_gtomp 21
RgM_minor 1036
RgM_shallowcopy 21104415
RgV_gtofp 56
RgV_is_QV 139962
RgV_is_ZV 31340522
RgV_isin 109213
RgV_isin_i 109213
RgV_isscalar 1140296
RgXQX_div 1904
RgXQX_rem 114083
RgX_coeff 2544022
RgX_copy 103548857
RgX_div 7102623
RgX_equal_var 26766285
RgX_fpnorml2 60463
RgX_gtofp 7117061
RgX_is_QX 378526
RgX_is_ZX 15637992
RgX_is_monomial 3079233
RgX_is_rational 67462
RgX_isscalar 0
RgX_renormalize 347497
RgX_shift_inplace 480656
RgX_shift_inplace_init 480656
RgX_to_RgV 140
Rg_col_ei 1290031
Rg_to_Fq 756
ZC_hnfrem 10677185
ZM_ZV_mod 539052
ZM_hnfrem 326807
ZM_lll 6933584
ZV_ZV_mod 7322736
ZV_dvd 23485
ZV_isscalar 22782514
ZV_to_zv 3190422
ZXQ_mul 2124947
ZXQ_sqr 949795
ZX_equal1 16659
ZX_is_monic 7180806
ZX_renormalize 152662320
Z_ispower 98
Z_issquare 458559
abgrp_get_cyc 11549405
abgrp_get_gen 1653741
abgrp_get_no 391984
absfrac 45169884
absfrac_shallow 47277
addmuliu 404597
addmuliu_inplace 59212934
affc_fixlg 239591
affgr 220535
bid_get_MOD 1990746
bid_get_U 3378365
bid_get_arch 35098
bid_get_archp 2217737
bid_get_cyc 5361598
bid_get_fact 2313929
bid_get_fact2 2025283
bid_get_gen 53326
bid_get_gen_nocheck 0
bid_get_grp 5415500
bid_get_ideal 78295
bid_get_mod 1386563
bid_get_no 0
bid_get_sarch 51226
bid_get_sprk 1991476
bin_copy 478130104
bit_accuracy 2837692894
bit_accuracy_mul 3178230
bit_prec 141370998
bnf_get_clgp 5097783
bnf_get_cyc 3509271
bnf_get_fu 25851
bnf_get_fu_nocheck 288140
bnf_get_gen 1579972
bnf_get_logfu 2702202
bnf_get_nf 9426125
bnf_get_no 8379
bnf_get_reg 641
bnf_get_sunits 1278409
bnf_get_tuN 265151
bnf_get_tuU 290491
bnr_get_bid 1937012
bnr_get_bnf 3632334
bnr_get_clgp 2728695
bnr_get_cyc 2396497
bnr_get_gen 7847
bnr_get_gen_nocheck 70
bnr_get_mod 141040
bnr_get_nf 1260075
bnr_get_no 314586
both_odd 116450398
cbrtr 0
cbrtr_abs 0
cgetalloc 8213
cgetc 963393
cgiv 117908110
checkell_i 4680904
closure_arity 360514325
closure_codestr 311878913
closure_get_code 0
closure_get_data 311834353
closure_get_dbg 13320
closure_get_frame 12949408
closure_get_oper 311858626
closure_get_text 36442
closure_is_variadic 39983924
col_ei 5699950
coltrunc_init 393680
const_col 9629558
const_vec 32901116
const_vecsmall 19085996
constant_coeff 1435256
cxcompotor 17934626
cxnorm 90730727
cxtofp 8951450
cxtoreal 384630
cyc_get_expo 2521768
cyclic_perm 99911
dbllog2r 92831257
degpol 5405800044
div_content 57584
divsBIL 8058524199
ellQp_get_p 1134
ellQp_get_prec 308
ellQp_get_zero 1463
ellR_get_prec 232652
ellR_get_sign 370819
ell_get_a1 7133605
ell_get_a2 5716521
ell_get_a3 6922398
ell_get_a4 6526034
ell_get_a6 7959620
ell_get_b2 5432107
ell_get_b4 2135457
ell_get_b6 3054739
ell_get_b8 2608999
ell_get_c4 8021789
ell_get_c6 8850646
ell_get_disc 11280325
ell_get_j 1296377
ell_get_type 11592144
ell_is_inf 51299050
ellff_get_a4a6 800247
ellff_get_field 2037202
ellinf 1872111
ellnf_get_bnf 126
ellnf_get_nf 2029428
equali1 1220837451
equalim1 139000263
err_get_compo 273
err_get_num 61899
gabsz 0
gaddgs 123137239
gaddz 0
gal_get_den 27587
gal_get_e 91
gal_get_gen 15456
gal_get_group 80135
gal_get_invvdm 27594
gal_get_mod 23744
gal_get_orders 6664
gal_get_p 6041
gal_get_pol 36050
gal_get_roots 32487
gc_all 86920633
gchar_copy_precs 1202
gchar_get_DLdata 188468
gchar_get_S 36864
gchar_get_U 0
gchar_get_Ui 10969
gchar_get_basis 32639
gchar_get_bnf 203105
gchar_get_cyc 16168
gchar_get_evalprec 4011
gchar_get_hnf 0
gchar_get_loccyc 50346
gchar_get_m0 3320
gchar_get_mod 8225
gchar_get_modP 4095
gchar_get_nalg 2042
gchar_get_nc 37130
gchar_get_nf 241464
gchar_get_nfprec 13419
gchar_get_nfree 322
gchar_get_nm 1841
gchar_get_ns 36864
gchar_get_ntors 322
gchar_get_prec 18732
gchar_get_r1 17416
gchar_get_r2 623
gchar_get_sfu 1747
gchar_get_u0 4266
gchar_get_zm 279433
gchar_set_HUUi 623
gchar_set_basis 1573
gchar_set_cyc 1573
gchar_set_evalprec 1785
gchar_set_m0 950
gchar_set_nalg 623
gchar_set_nf 2076
gchar_set_nfprec 2949
gchar_set_nfree 623
gchar_set_ntors 623
gchar_set_prec 1202
gchar_set_u0 2093
gcmpgs 780384
gdiventz 0
gdivsg 528209
gdivz 0
gen_I 1268004
gener_Fq_local 14602
gequalgs 29176
gerepileall 19024870
gerepilecoeffs 2197482
gerepilecopy 227235901
gerepilemany 984820
gerepileupto 1810894404
gerepileuptoint 3970645456
gerepileuptoleaf 1091407922
get_F2x_degree 1934395
get_F2x_mod 2501634
get_F2x_var 2534956
get_F2xqX_degree 201663
get_F2xqX_mod 399
get_F2xqX_var 376978
get_Flx_degree 88421687
get_Flx_mod 25883936
get_Flx_var 68332597
get_FlxqX_degree 319083
get_FlxqX_mod 8047
get_FlxqX_var 265846
get_FpXQX_degree 3686
get_FpXQX_mod 146583
get_FpXQX_var 51837
get_FpX_degree 6017056
get_FpX_mod 3388058
get_FpX_var 7238523
gisdouble 2967868
gmax_shallow 13509916
gmaxsg 0
gmin_shallow 869183
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 22094161
gmulgu 124173007
gmulz 0
gnegz 0
gshiftz 0
gsubgs 1691691
gsubz 0
gtodouble 60523041
gtofp 251861172
gtomp 22428
gtos 85800607
gtou 102636
guncloneNULL 48600124
guncloneNULL_deep 1327955
gval 5796
hash_str 2688624
hash_str_len 18254733
icopy_avma 7825077113
idealchineseinit 4514
idealred 138598
identity_ZV 4333
identity_perm 3103965
identity_zv 3128308
inf_get_sign 1193638
inv_content 0
is_bigint 556656067
is_const_t 4751632190
is_extscalar_t 6946
is_intreal_t 9579356
is_matvec_t 605729665
is_noncalc_t 95089872
is_pm1 2190722294
is_qfb_t 0
is_rational_t 5126894
is_real_t 62692072
is_recursive_t 8443813714
is_scalar_t 314820346
is_universal_constant 291063788
is_vec_t 43356397
isint1 17292134
isintm1 5956068
isintzero 2814318962
ismpzero 9579259
isonstack 7937665289
killblock 1861310
leading_coeff 169879389
leafcopy_avma 550278060
lg_increase 310884880
lgcols 341562719
lgpol 2569602484
lincombii 37825173
locs_get_Lgenfil 1260
locs_get_Lsprk 191695
locs_get_cyc 51954
locs_get_famod 1260
locs_get_m_infty 207235
locs_get_mod 8225
logint 751870
matpascal 3885
matslice 16478003
mkcol 10175226
mkcol2 155871525
mkcol2s 4415292
mkcol3 88314
mkcol3s 315
mkcol4 103320
mkcol4s 0
mkcol5 94
mkcol6 232043
mkcolcopy 33542
mkcols 40411
mkcomplex 90188137
mkerr 0
mkfrac 33750841
mkfraccopy 4795893
mkfracss 1209528
mkintmod 8206611
mkintmodu 1806
mkmat 4640322
mkmat2 32543888
mkmat22 50318519
mkmat22s 207452
mkmat3 17001
mkmat4 63
mkmat5 0
mkmatcopy 121084
mkmoo 105720
mkoo 1075644
mkpolmod 2973529
mkqfb 27797359
mkquad 69118
mkrfrac 698145
mkrfraccopy 14
mkvec 68040741
mkvec2 182151311
mkvec2copy 123181
mkvec2s 219598
mkvec3 123620743
mkvec3s 524441
mkvec4 6589253
mkvec4s 21
mkvec5 14486942
mkveccopy 122507
mkvecs 161
mkvecsmall 130138359
mkvecsmall2 224639770
mkvecsmall3 100377903
mkvecsmall4 15488595
mkvecsmall5 688708
modpr_get_T 13920846
modpr_get_p 1888115
modpr_get_pr 32093467
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 2509471
mul_denom 11278163
mulsubii 3845843
nbits2extraprec 1474259146
nbits2ndec 214
nbits2nlong 12611447
nbits2prec 185215462
nbrows 154546319
nchar2nlong 120928236
ndec2nbits 8256
ndec2nlong 41087
ndec2prec 32831
nfV_to_scalar_or_alg 26293
nf_get_G 301288
nf_get_M 20774262
nf_get_Tr 22085
nf_get_degree 81968318
nf_get_diff 4458
nf_get_disc 456276
nf_get_index 3581384
nf_get_invzk 9892264
nf_get_pol 109048300
nf_get_r1 22160471
nf_get_r2 4140
nf_get_ramified_primes 59183
nf_get_roots 1509077
nf_get_roundG 1685744
nf_get_sign 516468
nf_get_varn 1166918
nf_get_zk 4382
nf_get_zkden 5058141
nf_get_zkprimpart 5012048
normalize_frac 16693953
odd 2028126775
pari_calloc 46684
pari_err_BUG 14
pari_err_COMPONENT 214
pari_err_CONSTPOL 21
pari_err_COPRIME 84
pari_err_DIM 711
pari_err_DOMAIN 2750
pari_err_FILE 0
pari_err_FILEDESC 36
pari_err_FLAG 98
pari_err_IMPL 511
pari_err_INV 20004
pari_err_IRREDPOL 63
pari_err_MAXPRIME 0
pari_err_MODULUS 1316
pari_err_OP 406
pari_err_OVERFLOW 156
pari_err_PACKAGE 0
pari_err_PREC 238
pari_err_PRIME 98
pari_err_PRIORITY 245
pari_err_ROOTS0 63
pari_err_SQRTN 84
pari_err_TYPE 15251
pari_err_TYPE2 3493
pari_err_VAR 371
pari_free 491311370
pari_malloc 721614949
pari_realloc 1862
pari_realloc_ip 2075153
pari_stack_alloc 690195023
pari_stack_base 695346913
pari_stack_delete 5151606
pari_stack_init 5553312
pari_stack_new 597321367
pari_stack_pushp 5767
perm_conj 418299
perm_inv 2764338
perm_mul 79253985
perm_sqr 728
pol0_F2x 13244493
pol0_Flx 102852639
pol1_F2x 3955527
pol1_Flx 55399162
pol_0 35023121
pol_1 4387530
pol_x 3538901
pol_xn 2226900
pol_xnall 294
polx_F2x 1077708
polx_Flx 37607272
polx_zx 0
polxn_Flx 371
powIs 1561
powii 42911143
pr_get_e 15754874
pr_get_f 25354485
pr_get_gen 11511122
pr_get_p 91462842
pr_get_tau 47873599
pr_is_inert 16405911
pr_norm 1067474
prec2lg 4457161597
prec2nbits 104205121
prec2nbits_mul 570917
prec2ndec 9750
precdbl 474394
qfb_disc 18474957
qfb_disc3 4847601
qfb_is_qfi 68049483
quad_disc 1078
quadnorm 69860
random_Fq 0
remsBIL 7971291378
rnf_get_absdegree 1377518
rnf_get_alpha 1043
rnf_get_degree 2466302
rnf_get_disc 315
rnf_get_idealdisc 1127
rnf_get_index 105
rnf_get_invzk 1225
rnf_get_k 1015
rnf_get_map 124543
rnf_get_nf 697220
rnf_get_nfdegree 19957
rnf_get_nfpol 235999
rnf_get_nfvarn 3724
rnf_get_nfzk 5516
rnf_get_pol 2776606
rnf_get_polabs 287409
rnf_get_ramified_primes 2282
rnf_get_varn 574
rnf_get_zk 4263
row 762494
row_i 987
rowcopy 204988
rowpermute 14411642
rowslice 77570777
rowslicepermute 182190
rowsplice 273
ser_isexactzero 10079024
shallowcopy 25828005
sqrfrac 4142571
sqrti 6589194
sqrtnr 2792086
sqrtr 79874131
sstoQ 1074486
sturm 385
submulii 32710809
submuliu 7693
submuliu_inplace 59715147
truecoef 0
trunc_safe 0
ulogint 1721452
upr_norm 343929
uutoQ 158074130
vec_append 3430117
vec_ei 1703252
vec_lengthen 18940
vec_prepend 300926
vec_setconst 0
vec_shorten 11549
vec_to_vecsmall 4014934
veclast 6905268
vecmodii 0
vecmoduu 49784
vecpermute 20009892
vecreverse 697025
vecreverse_inplace 2570
vecslice 634069057
vecslicepermute 2618551
vecsmall_append 4065073
vecsmall_coincidence 0
vecsmall_concat 1457322
vecsmall_copy 4291355
vecsmall_ei 495630
vecsmall_indexmax 21
vecsmall_indexmin 21
vecsmall_isin 84
vecsmall_lengthen 505
vecsmall_lexcmp 7208565
vecsmall_max 1006996
vecsmall_min 1442
vecsmall_pack 84
vecsmall_prefixcmp 108088071
vecsmall_prepend 186771
vecsmall_reverse 3052
vecsmall_shorten 72570
vecsmall_to_col 7760625
vecsmall_to_vec 510023
vecsmall_to_vec_inplace 3304
vecsmallpermute 77063764
vecsmalltrunc_append 99880148
vecsmalltrunc_init 187179187
vecsplice 354715
vectrunc_append 15249895
vectrunc_append_batch 10864
vectrunc_init 11715964
zc_to_ZC 7746445
zero_F2m 0
zero_F2m_copy 842301
zero_F2v 3617853
zero_F2x 1350
zero_Flm 2752070
zero_Flm_copy 232050
zero_Flv 58638206
zero_Flx 1427152
zero_zm 0
zero_zv 36089554
zero_zx 0
zerocol 121281763
zeromat 109004
zeromatcopy 14016779
zeropadic 855976
zeropadic_shallow 15358
zeropol 14736190
zeroser 138698
zerovec 26625765
zerovec_block 24429
zm_copy 0
zm_row 0
zm_to_zxV 0
zm_transpose 266
znstar_get_N 34543777
znstar_get_U 176051
znstar_get_Ui 46788
znstar_get_conreycyc 7823726
znstar_get_conreygen 3221793
znstar_get_cyc 261948
znstar_get_faN 7210394
znstar_get_gen 16150
znstar_get_no 14
znstar_get_pe 2820763
zv_copy 2184067
zv_to_ZV 501462
zv_to_zx 104146
zx_renormalize 14049
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.16