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 29712-7c8a932571) Lines: 1444 1584 91.2 %
Date: 2024-11-15 09:08:45 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 8082473
F2m_copy 197730
F2m_flip 1559628
F2m_set 798
F2v_clear 12150258
F2v_coeff 660381403
F2v_copy 4487
F2v_ei 42
F2v_flip 1559628
F2v_set 101399742
F2v_to_F2x 38217
F2xX_shift 0
F2x_clear 12150254
F2x_coeff 666963511
F2x_copy 62605799
F2x_div 1571006
F2x_equal 4700309
F2x_equal1 2870829
F2x_flip 1559628
F2x_renormalize 122418881
F2x_set 128346353
F2xqX_div 33243
F3m_coeff 3206279
F3m_copy 0
F3m_set 0
Flm_copy 6246023
Flm_row 8467791
Flv_copy 2478995
Flx_constant 137721
Flx_copy 173630512
Flx_div 1988755
Flx_div_pre 21358093
Flx_equal1 9979996
Flx_lead 963987
Flx_mulu 1086810
FlxqX_div 0
FlxqX_div_pre 165543
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 4546
FpXQX_renormalize 4707966
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 853152
FpXY_Fq_evaly 20587
FpX_div 5427926
FpX_renormalize 143861076
Fp_add 174714333
Fp_addmul 11304195
Fp_center 75554609
Fp_center_i 13853184
Fp_div 1614122
Fp_divu 1898107
Fp_double 21001939
Fp_halve 252521
Fp_inv 36520129
Fp_invsafe 1186527
Fp_mul 182366810
Fp_muls 17780
Fp_mulu 73010162
Fp_neg 28850751
Fp_red 80058447
Fp_sqr 64158539
Fp_sub 148169958
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 568175
FqX_Fq_mul 427379
FqX_add 127694
FqX_ddf 7
FqX_degfact 47786
FqX_deriv 723681
FqX_div 40274
FqX_div_by_X_x 71939
FqX_divrem 0
FqX_extgcd 442871
FqX_factor 141716
FqX_factor_squarefree 7
FqX_gcd 693350
FqX_get_red 6090
FqX_halfgcd 0
FqX_halve 19411
FqX_integ 0
FqX_mul 368588
FqX_mulu 21942
FqX_neg 24956
FqX_normalize 4865
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 3424516
Fq_to_FpXQ 110255
GENbinbase 888051173
QV_isscalar 64690413
Q_abs 7789599
Q_abs_shallow 171537
Qtoss 19383
R_abs 0
R_abs_shallow 13083
RgC_fpnorml2 618699
RgC_gtofp 33673963
RgC_gtomp 574
RgM_dimensions 9405987
RgM_fpnorml2 22177
RgM_gtofp 8174268
RgM_gtomp 21
RgM_minor 1036
RgM_shallowcopy 21104547
RgV_gtofp 56
RgV_is_QV 139952
RgV_is_ZV 31338790
RgV_isin 109213
RgV_isin_i 109213
RgV_isscalar 1140296
RgXQX_div 1904
RgXQX_rem 114076
RgX_coeff 2543854
RgX_copy 103548827
RgX_div 7102479
RgX_equal_var 26763182
RgX_fpnorml2 60464
RgX_gtofp 7117292
RgX_is_QX 378517
RgX_is_ZX 15635685
RgX_is_monomial 3078865
RgX_is_rational 67453
RgX_isscalar 0
RgX_renormalize 347497
RgX_shift_inplace 480656
RgX_shift_inplace_init 480656
RgX_to_RgV 140
Rg_col_ei 1289743
Rg_to_Fq 756
ZC_hnfrem 10677231
ZM_ZV_mod 539027
ZM_hnfrem 326799
ZM_lll 6933271
ZV_ZV_mod 7322737
ZV_dvd 23485
ZV_isscalar 22782329
ZV_to_zv 3190296
ZXQ_mul 2124918
ZXQ_sqr 949777
ZX_equal1 14082
ZX_is_monic 7180568
ZX_renormalize 151879174
Z_ispower 98
Z_issquare 458560
abgrp_get_cyc 11549485
abgrp_get_gen 1653756
abgrp_get_no 391992
absfrac 45144677
absfrac_shallow 47277
addmuliu 404724
addmuliu_inplace 59207055
affc_fixlg 239492
affgr 220535
bid_get_MOD 1990748
bid_get_U 3378366
bid_get_arch 35098
bid_get_archp 2217775
bid_get_cyc 5361649
bid_get_fact 2313963
bid_get_fact2 2025285
bid_get_gen 53326
bid_get_gen_nocheck 0
bid_get_grp 5415546
bid_get_ideal 78295
bid_get_mod 1386561
bid_get_no 0
bid_get_sarch 51226
bid_get_sprk 1991469
bin_copy 457393232
bit_accuracy 2795944839
bit_accuracy_mul 3178185
bit_prec 141373786
bnf_get_clgp 5097815
bnf_get_cyc 3509283
bnf_get_fu 25852
bnf_get_fu_nocheck 288143
bnf_get_gen 1579985
bnf_get_logfu 2702212
bnf_get_nf 9426159
bnf_get_no 8379
bnf_get_reg 641
bnf_get_sunits 1278414
bnf_get_tuN 265146
bnf_get_tuU 290495
bnr_get_bid 1937026
bnr_get_bnf 3632375
bnr_get_clgp 2728712
bnr_get_cyc 2396506
bnr_get_gen 7847
bnr_get_gen_nocheck 70
bnr_get_mod 141041
bnr_get_nf 1260096
bnr_get_no 314594
both_odd 116602778
cbrtr 0
cbrtr_abs 0
cgetalloc 8185
cgetc 958149
cgiv 117964848
checkell_i 4682721
closure_arity 360515683
closure_codestr 311881068
closure_get_code 0
closure_get_data 311835034
closure_get_dbg 13250
closure_get_frame 12949106
closure_get_oper 311859844
closure_get_text 36302
closure_is_variadic 39983888
col_ei 5699589
coltrunc_init 393680
const_col 9614525
const_vec 32888014
const_vecsmall 19085057
constant_coeff 1435224
cxcompotor 17933599
cxnorm 90636044
cxtofp 8950898
cxtoreal 384532
cyc_get_expo 2521773
cyclic_perm 99911
dbllog2r 92666326
degpol 5408776220
div_content 57571
divsBIL 8051223353
ellQp_get_p 1134
ellQp_get_prec 315
ellQp_get_zero 1484
ellR_get_prec 249662
ellR_get_sign 370840
ell_get_a1 7133589
ell_get_a2 5716488
ell_get_a3 6922381
ell_get_a4 6526001
ell_get_a6 7959601
ell_get_b2 5432102
ell_get_b4 2135450
ell_get_b6 3054732
ell_get_b8 2608985
ell_get_c4 8021758
ell_get_c6 8850628
ell_get_disc 11280297
ell_get_j 1296370
ell_get_type 11379677
ell_is_inf 47556894
ellff_get_a4a6 800246
ellff_get_field 2037193
ellinf 1232415
ellnf_get_bnf 126
ellnf_get_nf 1888750
equali1 1196287562
equalim1 138999950
err_get_compo 273
err_get_num 61759
gabsz 0
gaddgs 123129047
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 81541798
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 616064
gdiventz 0
gdivsg 521014
gdivz 0
gen_I 1267865
gener_Fq_local 14602
gequalgs 29176
gerepileall 18972624
gerepilecoeffs 2197579
gerepilecopy 209225880
gerepilemany 984798
gerepileupto 1811430064
gerepileuptoint 3967868461
gerepileuptoleaf 1092692503
get_F2x_degree 1934301
get_F2x_mod 2518409
get_F2x_var 2534919
get_F2xqX_degree 201663
get_F2xqX_mod 399
get_F2xqX_var 376978
get_Flx_degree 88039116
get_Flx_mod 25913181
get_Flx_var 68355536
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 6015686
get_FpX_mod 3479325
get_FpX_var 7260003
gisdouble 2968105
gmax_shallow 13509875
gmaxsg 0
gmin_shallow 869207
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 22087257
gmulgu 124153918
gmulz 0
gnegz 0
gshiftz 0
gsubgs 1691342
gsubz 0
gtodouble 60523170
gtofp 251849909
gtomp 22428
gtos 85800598
gtou 102637
guncloneNULL 49080908
guncloneNULL_deep 1324478
gval 5782
hash_str 2664938
hash_str_len 18250176
icopy_avma 7780602388
idealchineseinit 4437
idealred 138608
identity_ZV 4277
identity_perm 3103781
identity_zv 3128124
inf_get_sign 1193467
inv_content 0
is_bigint 556542529
is_const_t 4749691124
is_extscalar_t 6946
is_intreal_t 9531777
is_matvec_t 613607799
is_noncalc_t 95016593
is_pm1 2189659919
is_qfb_t 0
is_rational_t 5126423
is_real_t 62669161
is_recursive_t 8382749648
is_scalar_t 314620121
is_universal_constant 291082820
is_vec_t 18213328
isint1 16064423
isintm1 5955893
isintzero 2812602645
ismpzero 9531672
isonstack 7936896209
killblock 1859911
leading_coeff 170457423
leafcopy_avma 539992167
lg_increase 312581571
lgcols 341563975
lgpol 2588391300
lincombii 37828963
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 751882
matpascal 35833
matslice 16477318
mkcol 10174134
mkcol2 155930580
mkcol2s 4414032
mkcol3 88314
mkcol3s 315
mkcol4 103320
mkcol4s 0
mkcol5 94
mkcol6 232050
mkcolcopy 33545
mkcols 40411
mkcomplex 90031922
mkerr 0
mkfrac 33725355
mkfraccopy 4794889
mkfracss 1209528
mkintmod 8206503
mkintmodu 1806
mkmat 4640166
mkmat2 32477801
mkmat22 50348579
mkmat22s 206822
mkmat3 17001
mkmat4 63
mkmat5 0
mkmatcopy 121105
mkmoo 105699
mkoo 1075478
mkpolmod 2972942
mkqfb 27797009
mkquad 69132
mkrfrac 698145
mkrfraccopy 14
mkvec 67400272
mkvec2 182425410
mkvec2copy 123180
mkvec2s 219586
mkvec3 122769185
mkvec3s 524441
mkvec4 6588541
mkvec4s 21
mkvec5 14486569
mkveccopy 122507
mkvecs 161
mkvecsmall 130293149
mkvecsmall2 224547051
mkvecsmall3 99271325
mkvecsmall4 15480907
mkvecsmall5 688681
modpr_get_T 13920772
modpr_get_p 1888117
modpr_get_pr 32093304
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 2509550
mul_denom 11278070
mulsubii 3845550
nbits2extraprec 1469581132
nbits2ndec 214
nbits2nlong 12628951
nbits2prec 185063110
nbrows 154545542
nchar2nlong 120924557
ndec2nbits 8256
ndec2nlong 40989
ndec2prec 32733
nfV_to_scalar_or_alg 26293
nf_get_G 301350
nf_get_M 20774022
nf_get_Tr 22084
nf_get_degree 81967991
nf_get_diff 4458
nf_get_disc 456228
nf_get_index 3581207
nf_get_invzk 9891925
nf_get_pol 109063411
nf_get_r1 22160046
nf_get_r2 4140
nf_get_ramified_primes 59176
nf_get_roots 1508502
nf_get_roundG 1685738
nf_get_sign 516468
nf_get_varn 1165309
nf_get_zk 4382
nf_get_zkden 5057890
nf_get_zkprimpart 5011796
normalize_frac 16690984
odd 2027539639
pari_calloc 46397
pari_err_BUG 14
pari_err_COMPONENT 214
pari_err_CONSTPOL 21
pari_err_COPRIME 84
pari_err_DIM 711
pari_err_DOMAIN 2743
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 15181
pari_err_TYPE2 3500
pari_err_VAR 371
pari_free 470562748
pari_malloc 700970411
pari_realloc 1848
pari_realloc_ip 2075567
pari_stack_alloc 690186330
pari_stack_base 695308445
pari_stack_delete 5138663
pari_stack_init 5552733
pari_stack_new 597292970
pari_stack_pushp 5725
perm_conj 418299
perm_inv 2764194
perm_mul 79251687
perm_sqr 728
pol0_F2x 13259951
pol0_Flx 103007724
pol1_F2x 3971998
pol1_Flx 55496046
pol_0 35199609
pol_1 4471479
pol_x 3539028
pol_xn 2226839
pol_xnall 294
polx_F2x 1078526
polx_Flx 37610534
polx_zx 0
polxn_Flx 371
powIs 1561
powii 38074748
pr_get_e 15754922
pr_get_f 25354715
pr_get_gen 11510837
pr_get_p 91463346
pr_get_tau 47874465
pr_is_inert 16405919
pr_norm 1067566
prec2lg 4447895779
prec2nbits 103924041
prec2nbits_mul 570834
prec2ndec 9750
precdbl 474409
qfb_disc 18474944
qfb_disc3 4847406
qfb_is_qfi 59611116
quad_disc 1078
quadnorm 69860
random_Fq 0
remsBIL 7963519199
rnf_get_absdegree 1376944
rnf_get_alpha 1043
rnf_get_degree 2464916
rnf_get_disc 315
rnf_get_idealdisc 1120
rnf_get_index 105
rnf_get_invzk 1225
rnf_get_k 1015
rnf_get_map 124326
rnf_get_nf 696450
rnf_get_nfdegree 19894
rnf_get_nfpol 235565
rnf_get_nfvarn 3696
rnf_get_nfzk 5502
rnf_get_pol 2774646
rnf_get_polabs 286856
rnf_get_ramified_primes 2275
rnf_get_varn 574
rnf_get_zk 4256
row 762496
row_i 987
rowcopy 204988
rowpermute 14411049
rowslice 77569468
rowslicepermute 182246
rowsplice 273
ser_isexactzero 10129536
shallowcopy 25827547
sqrfrac 4142289
sqrti 6589003
sqrtnr 2791787
sqrtr 79872898
sstoQ 1073702
sturm 385
submulii 32710809
submuliu 7693
submuliu_inplace 59708308
truecoef 0
trunc_safe 0
ulogint 1718551
upr_norm 343931
uutoQ 158055090
vec_append 3430085
vec_ei 1703074
vec_lengthen 18940
vec_prepend 300926
vec_setconst 0
vec_shorten 11550
vec_to_vecsmall 4014794
veclast 6989632
vecmodii 0
vecmoduu 49784
vecpermute 20009056
vecreverse 697025
vecreverse_inplace 2570
vecslice 633920180
vecslicepermute 2618686
vecsmall_append 4060721
vecsmall_coincidence 0
vecsmall_concat 1457336
vecsmall_copy 4291039
vecsmall_ei 495562
vecsmall_indexmax 21
vecsmall_indexmin 21
vecsmall_isin 84
vecsmall_lengthen 505
vecsmall_lexcmp 7208555
vecsmall_max 1007007
vecsmall_min 1442
vecsmall_pack 84
vecsmall_prefixcmp 108088071
vecsmall_prepend 186659
vecsmall_reverse 3052
vecsmall_shorten 72571
vecsmall_to_col 7760543
vecsmall_to_vec 510016
vecsmall_to_vec_inplace 3262
vecsmallpermute 77061402
vecsmalltrunc_append 99893220
vecsmalltrunc_init 187782227
vecsplice 354706
vectrunc_append 15250901
vectrunc_append_batch 10864
vectrunc_init 11717565
zc_to_ZC 7746362
zero_F2m 0
zero_F2m_copy 842207
zero_F2v 3617653
zero_F2x 1350
zero_Flm 2752137
zero_Flm_copy 232049
zero_Flv 61694404
zero_Flx 1427123
zero_zm 0
zero_zv 37848202
zero_zx 0
zerocol 121267836
zeromat 109014
zeromatcopy 14015826
zeropadic 855756
zeropadic_shallow 15337
zeropol 14731345
zeroser 138796
zerovec 26618540
zerovec_block 24429
zm_copy 0
zm_row 0
zm_to_zxV 0
zm_transpose 266
znstar_get_N 33826249
znstar_get_U 176051
znstar_get_Ui 46788
znstar_get_conreycyc 7820324
znstar_get_conreygen 3220484
znstar_get_cyc 261934
znstar_get_faN 7207853
znstar_get_gen 16150
znstar_get_no 14
znstar_get_pe 2820140
zv_copy 2157614
zv_to_ZV 501455
zv_to_zx 104146
zx_renormalize 14049
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.16