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.16.2 lcov report (development 29115-f22e516b23) Lines: 1441 1583 91.0 %
Date: 2024-02-24 08:04:37 Functions: 645 716 90.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 6438505
F2m_copy 195194
F2m_flip 1561697
F2m_set 686
F2v_clear 11574173
F2v_coeff 640782215
F2v_copy 4074
F2v_ei 42
F2v_flip 1561697
F2v_set 99855896
F2v_to_F2x 38239
F2xX_shift 0
F2x_clear 11574155
F2x_coeff 647540436
F2x_copy 60313806
F2x_div 1542270
F2x_equal 4606256
F2x_equal1 2867426
F2x_flip 1561697
F2x_renormalize 119958718
F2x_set 126348567
F2xqX_div 33243
F3m_coeff 1811203
F3m_copy 0
F3m_set 0
Flm_copy 6174150
Flm_row 7789804
Flv_copy 2384940
Flx_constant 137786
Flx_copy 171077611
Flx_div 1987219
Flx_div_pre 21275988
Flx_equal1 9968849
Flx_lead 777552
Flx_mulu 1085737
FlxqX_div 0
FlxqX_div_pre 165193
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 4546
FpXQX_renormalize 4702571
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 853094
FpXY_Fq_evaly 20587
FpX_div 5410579
FpX_renormalize 143365931
Fp_add 171511287
Fp_addmul 11382315
Fp_center 75524109
Fp_center_i 13590839
Fp_div 1611939
Fp_divu 1904614
Fp_double 21501593
Fp_halve 252540
Fp_inv 25727882
Fp_invsafe 1182239
Fp_mul 178302493
Fp_muls 17780
Fp_mulu 68015123
Fp_neg 27092305
Fp_red 46563930
Fp_sqr 65751634
Fp_sub 137220841
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 558450
FqX_Fq_mul 426575
FqX_add 127694
FqX_ddf 7
FqX_degfact 47341
FqX_deriv 723681
FqX_div 39574
FqX_div_by_X_x 71939
FqX_divrem 0
FqX_extgcd 435147
FqX_factor 141163
FqX_factor_squarefree 7
FqX_gcd 692426
FqX_get_red 6090
FqX_halfgcd 0
FqX_halve 19411
FqX_integ 0
FqX_mul 367449
FqX_mulu 21942
FqX_neg 24956
FqX_normalize 4403
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 3406017
Fq_to_FpXQ 110255
GENbinbase 852769988
QV_isscalar 63215709
Q_abs 7279691
Q_abs_shallow 166780
Qtoss 19257
R_abs 0
R_abs_shallow 12971
RgC_fpnorml2 616654
RgC_gtofp 30332079
RgC_gtomp 574
RgM_dimensions 9228254
RgM_fpnorml2 21598
RgM_gtofp 7238651
RgM_gtomp 21
RgM_minor 1036
RgM_shallowcopy 20572560
RgV_gtofp 56
RgV_is_QV 139309
RgV_is_ZV 31250313
RgV_isin 109073
RgV_isin_i 109073
RgV_isscalar 8545
RgXQX_div 1904
RgXQX_rem 107442
RgX_coeff 2517576
RgX_copy 102864442
RgX_div 6916316
RgX_equal_var 26742462
RgX_fpnorml2 59828
RgX_gtofp 6850511
RgX_is_QX 361458
RgX_is_ZX 14574389
RgX_is_monomial 2925739
RgX_is_rational 66770
RgX_isscalar 0
RgX_renormalize 347497
RgX_shift_inplace 479913
RgX_shift_inplace_init 479913
RgX_to_RgV 140
Rg_col_ei 1242395
Rg_to_Fq 756
ZC_hnfrem 11253902
ZM_ZV_mod 536140
ZM_hnfrem 326424
ZM_lll 6928638
ZV_ZV_mod 7311135
ZV_dvd 23240
ZV_isscalar 24305706
ZV_to_zv 3189456
ZXQ_mul 2125865
ZXQ_sqr 955195
ZX_equal1 14136
ZX_is_monic 6924390
ZX_renormalize 148683405
Z_ispower 98
Z_issquare 458500
abgrp_get_cyc 11496147
abgrp_get_gen 1652297
abgrp_get_no 391573
absfrac 43554923
absfrac_shallow 46150
addmuliu 406159
addmuliu_inplace 60033089
affc_fixlg 248403
affgr 220528
bid_get_U 3373008
bid_get_arch 35042
bid_get_archp 2214839
bid_get_cyc 5353767
bid_get_fact 2310866
bid_get_fact2 2022406
bid_get_gen 53305
bid_get_gen_nocheck 0
bid_get_grp 5407655
bid_get_ideal 71547
bid_get_mod 1384191
bid_get_no 0
bid_get_sarch 51170
bid_get_sprk 1988604
bin_copy 439421732
bit_accuracy 2710987276
bit_accuracy_mul 2871407
bit_prec 139641093
bnf_get_clgp 5092157
bnf_get_cyc 3505038
bnf_get_fu 25838
bnf_get_fu_nocheck 287919
bnf_get_gen 1578588
bnf_get_logfu 2700067
bnf_get_nf 9414537
bnf_get_no 8379
bnf_get_reg 641
bnf_get_sunits 1277243
bnf_get_tuN 264942
bnf_get_tuU 290275
bnr_get_bid 1934169
bnr_get_bnf 3626831
bnr_get_clgp 2724796
bnr_get_cyc 2392926
bnr_get_gen 7847
bnr_get_gen_nocheck 70
bnr_get_mod 140655
bnr_get_nf 1259111
bnr_get_no 314256
both_odd 66424426
cbrtr 0
cbrtr_abs 0
cgetalloc 8073
cgetc 2038552
cgiv 118928100
checkell_i 4060338
closure_arity 362389673
closure_codestr 313509086
closure_get_code 0
closure_get_data 313475149
closure_get_dbg 12769
closure_get_frame 13191765
closure_get_oper 313496075
closure_get_text 35361
closure_is_variadic 40039024
col_ei 5621846
coltrunc_init 373324
const_col 9166623
const_vec 32402068
const_vecsmall 18174776
constant_coeff 1420664
cxcompotor 17544487
cxnorm 89739384
cxtofp 8756637
cxtoreal 393447
cyc_get_expo 2515979
cyclic_perm 98483
dbllog2r 88847381
degpol 4923501528
div_content 37809
divsBIL 7881062919
ellQp_get_p 1134
ellQp_get_prec 315
ellQp_get_zero 1484
ellR_get_prec 232337
ellR_get_sign 334150
ell_get_a1 7059737
ell_get_a2 5682722
ell_get_a3 6870237
ell_get_a4 6491255
ell_get_a6 7929272
ell_get_b2 5353848
ell_get_b4 2085780
ell_get_b6 3003704
ell_get_b8 2592752
ell_get_c4 7081125
ell_get_c6 7918786
ell_get_disc 10288878
ell_get_j 1260418
ell_get_type 9567899
ell_is_inf 47529785
ellff_get_a4a6 800321
ellff_get_field 2037312
ellinf 1232319
ellnf_get_bnf 126
ellnf_get_nf 1888743
equali1 1132727475
equalim1 138564306
err_get_compo 266
err_get_num 60811
gabsz 0
gaddgs 121931728
gaddz 0
gal_get_den 27447
gal_get_e 91
gal_get_gen 8638
gal_get_group 79456
gal_get_invvdm 27454
gal_get_mod 23660
gal_get_orders 6636
gal_get_p 6006
gal_get_pol 35868
gal_get_roots 32312
gc_all 79085338
gchar_copy_precs 1202
gchar_get_DLdata 188468
gchar_get_S 36994
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 50476
gchar_get_m0 3450
gchar_get_mod 8225
gchar_get_modP 4095
gchar_get_nalg 2042
gchar_get_nc 37260
gchar_get_nf 241744
gchar_get_nfprec 13419
gchar_get_nfree 322
gchar_get_nm 1841
gchar_get_ns 36994
gchar_get_ntors 322
gchar_get_prec 18732
gchar_get_r1 17416
gchar_get_r2 623
gchar_get_sfu 1877
gchar_get_u0 4539
gchar_get_zm 279563
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 2296
gchar_set_nfprec 3079
gchar_set_nfree 623
gchar_set_ntors 623
gchar_set_prec 1202
gchar_set_u0 2093
gcmpgs 613425
gdiventz 0
gdivsg 478172
gdivz 0
gen_I 1225899
gener_Fq_local 14580
gequalgs 26852
gerepileall 19660429
gerepilecoeffs 2159354
gerepilecopy 193839132
gerepilemany 972171
gerepileupto 1688752381
gerepileuptoint 3444111847
gerepileuptoleaf 1058140576
get_F2x_degree 1934251
get_F2x_mod 2517057
get_F2x_var 2534972
get_F2xqX_degree 201663
get_F2xqX_mod 399
get_F2xqX_var 376978
get_Flx_degree 85726675
get_Flx_mod 25820016
get_Flx_var 67225798
get_FlxqX_degree 318872
get_FlxqX_mod 8040
get_FlxqX_var 265642
get_FpXQX_degree 3686
get_FpXQX_mod 146583
get_FpXQX_var 51837
get_FpX_degree 5820079
get_FpX_mod 3473691
get_FpX_var 7016356
gisdouble 2836583
gmax_shallow 13509392
gmaxsg 0
gmin_shallow 885823
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 37449947
gmulgu 124123894
gmulz 0
gnegz 0
gshiftz 0
gsubgs 2119660
gsubz 0
gtodouble 59762215
gtofp 235911356
gtomp 22428
gtos 85748050
gtou 106326
guncloneNULL 49457455
guncloneNULL_deep 1443478
gval 5722
hash_str 2603251
hash_str_len 18150953
icopy_avma 7210628949
idealchineseinit 3415
idealred 135762
identity_ZV 4249
identity_perm 2792197
identity_zv 2816536
inf_get_sign 316443
inv_content 0
is_bigint 530299355
is_const_t 4733180820
is_extscalar_t 6932
is_intreal_t 8913993
is_matvec_t 603634197
is_noncalc_t 94630130
is_pm1 2225325633
is_qfb_t 0
is_rational_t 4943459
is_real_t 62490621
is_recursive_t 8110563710
is_scalar_t 314129745
is_universal_constant 290463803
is_vec_t 1823166
isint1 16168104
isintm1 5805731
isintzero 2786963911
ismpzero 8913897
isonstack 6930012396
killblock 1920581
leading_coeff 162554050
leafcopy_avma 562245746
lg_increase 319704490
lgcols 330967632
lgpol 2496820497
lincombii 37187205
locs_get_Lgenfil 1260
locs_get_Lsprk 191695
locs_get_cyc 52084
locs_get_famod 1260
locs_get_m_infty 207235
locs_get_mod 8225
logint 741696
matpascal 35760
matslice 16182221
mkcol 9343901
mkcol2 128741293
mkcol2s 2998352
mkcol3 86466
mkcol3s 308
mkcol4 102935
mkcol4s 0
mkcol5 94
mkcol6 213705
mkcolcopy 28804
mkcols 40411
mkcomplex 87364906
mkerr 0
mkfrac 32954844
mkfraccopy 4724829
mkfracss 1205711
mkintmod 8193826
mkintmodu 1806
mkmat 4570996
mkmat2 30967077
mkmat22 38257057
mkmat22s 130830
mkmat3 16777
mkmat4 0
mkmat5 0
mkmatcopy 112619
mkmoo 103423
mkoo 200821
mkpolmod 2808280
mkqfb 27912615
mkquad 69132
mkrfrac 698138
mkrfraccopy 7
mkvec 67768700
mkvec2 180780948
mkvec2copy 118481
mkvec2s 213055
mkvec3 105045991
mkvec3s 524441
mkvec4 6492667
mkvec4s 21
mkvec5 14142720
mkveccopy 117656
mkvecs 161
mkvecsmall 125997926
mkvecsmall2 218012071
mkvecsmall3 94251400
mkvecsmall4 15227663
mkvecsmall5 664453
modpr_get_T 13865917
modpr_get_p 1887431
modpr_get_pr 31963306
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 1344387
mul_denom 10298687
mulsubii 3797981
nbits2extraprec 1444186230
nbits2ndec 214
nbits2nlong 12076698
nbits2prec 181159198
nbrows 153108688
nchar2nlong 87436966
ndec2nbits 8256
ndec2nlong 40055
ndec2prec 31799
nfV_to_scalar_or_alg 26279
nf_get_G 248439
nf_get_M 5796368
nf_get_Tr 22067
nf_get_degree 79939235
nf_get_diff 4430
nf_get_disc 453301
nf_get_index 3570825
nf_get_invzk 9828272
nf_get_pol 105821514
nf_get_r1 5777381
nf_get_r2 4112
nf_get_ramified_primes 58007
nf_get_roots 1306013
nf_get_roundG 1627216
nf_get_sign 515829
nf_get_varn 1163169
nf_get_zk 1848
nf_get_zkden 4114943
nf_get_zkprimpart 4068572
normalize_frac 16457707
odd 2001458416
pari_calloc 45053
pari_err_BUG 50
pari_err_COMPONENT 200
pari_err_CONSTPOL 21
pari_err_COPRIME 84
pari_err_DIM 676
pari_err_DOMAIN 2666
pari_err_FILE 0
pari_err_FILEDESC 36
pari_err_FLAG 98
pari_err_IMPL 497
pari_err_INV 19983
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 84
pari_err_PRIORITY 245
pari_err_ROOTS0 63
pari_err_SQRTN 84
pari_err_TYPE 14768
pari_err_TYPE2 3536
pari_err_VAR 364
pari_free 452698364
pari_malloc 683023060
pari_realloc 1820
pari_realloc_ip 2271938
pari_stack_alloc 689804378
pari_stack_base 695337530
pari_stack_delete 5580534
pari_stack_init 6061151
pari_stack_new 596570428
pari_stack_pushp 5641
perm_conj 418299
perm_inv 2686177
perm_mul 76849209
perm_sqr 728
pol0_F2x 13164526
pol0_Flx 98775392
pol1_F2x 3969980
pol1_Flx 55252263
pol_0 35154703
pol_1 4449500
pol_x 2650185
pol_xn 2222854
pol_xnall 294
polx_F2x 1070092
polx_Flx 35785136
polx_zx 0
polxn_Flx 371
powIs 1547
powii 38015876
pr_get_e 11437427
pr_get_f 24351685
pr_get_gen 11442685
pr_get_p 80657729
pr_get_tau 39244255
pr_is_inert 9129265
pr_norm 1009990
prec2lg 4339482033
prec2nbits 102565036
prec2nbits_mul 579792
prec2ndec 9750
precdbl 4622
qfb_disc 18470218
qfb_disc3 4837227
qfb_is_qfi 58954389
quad_disc 1078
quadnorm 69860
random_Fq 0
remsBIL 7794295987
rnf_get_absdegree 768035
rnf_get_alpha 903
rnf_get_degree 1224649
rnf_get_disc 245
rnf_get_idealdisc 819
rnf_get_index 105
rnf_get_invzk 1225
rnf_get_k 805
rnf_get_map 107826
rnf_get_nf 459613
rnf_get_nfdegree 17458
rnf_get_nfpol 199284
rnf_get_nfvarn 3388
rnf_get_nfzk 4725
rnf_get_pol 1486611
rnf_get_polabs 227273
rnf_get_ramified_primes 1869
rnf_get_varn 455
rnf_get_zk 3850
row 795910
row_i 987
rowcopy 204988
rowpermute 13966079
rowslice 76177864
rowslicepermute 153308
rowsplice 210
ser_isexactzero 10063992
shallowcopy 19477375
sqrfrac 3917860
sqrti 6561898
sqrtnr 2740085
sqrtr 74370806
sstoQ 783167
sturm 385
submulii 32957128
submuliu 7693
submuliu_inplace 60507578
truecoef 0
trunc_safe 0
ulogint 1787063
upr_norm 343930
uutoQ 158053843
vec_append 3424073
vec_ei 1698217
vec_lengthen 18927
vec_prepend 300618
vec_setconst 0
vec_shorten 11542
vec_to_vecsmall 4010715
veclast 6585187
vecmodii 0
vecmoduu 49784
vecpermute 18878281
vecreverse 481642
vecreverse_inplace 2549
vecslice 594798630
vecslicepermute 2504844
vecsmall_append 4054742
vecsmall_coincidence 0
vecsmall_concat 1472952
vecsmall_copy 3956082
vecsmall_ei 50274
vecsmall_indexmax 14
vecsmall_indexmin 14
vecsmall_isin 84
vecsmall_lengthen 504
vecsmall_lexcmp 7073316
vecsmall_max 920840
vecsmall_min 1442
vecsmall_pack 84
vecsmall_prefixcmp 108088071
vecsmall_prepend 184924
vecsmall_reverse 3003
vecsmall_shorten 71411
vecsmall_to_col 7622466
vecsmall_to_vec 499217
vecsmall_to_vec_inplace 2963
vecsmallpermute 74861152
vecsmalltrunc_append 83820941
vecsmalltrunc_init 173481833
vecsplice 354285
vectrunc_append 15115148
vectrunc_append_batch 10864
vectrunc_init 11661028
zc_to_ZC 7608642
zero_F2m 0
zero_F2m_copy 835354
zero_F2v 3409574
zero_F2x 1350
zero_Flm 2711404
zero_Flm_copy 229392
zero_Flv 60752646
zero_Flx 1333880
zero_zm 0
zero_zv 37145776
zero_zx 0
zerocol 115959593
zeromat 90649
zeromatcopy 13009629
zeropadic 846592
zeropadic_shallow 10101
zeropol 14735561
zeroser 138490
zerovec 25788971
zerovec_block 24072
zm_copy 0
zm_row 0
zm_to_zxV 0
zm_transpose 266
znstar_get_N 33688902
znstar_get_U 156031
znstar_get_Ui 46788
znstar_get_conreycyc 7763806
znstar_get_conreygen 3211048
znstar_get_cyc 228586
znstar_get_faN 7127416
znstar_get_gen 16150
znstar_get_no 14
znstar_get_pe 2813133
zv_copy 2157702
zv_to_ZV 494135
zv_to_zx 104139
zx_renormalize 14042
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.14