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.1 lcov report (development 29877-9124a6ce27) Lines: 1437 1578 91.1 %
Date: 2025-01-18 09:08:44 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 8029736
F2m_copy 198363
F2m_flip 1554094
F2m_set 798
F2v_clear 12221312
F2v_coeff 660519193
F2v_copy 4487
F2v_ei 42
F2v_flip 1554094
F2v_set 101322131
F2v_to_F2x 38227
F2xX_shift 0
F2x_clear 12221307
F2x_coeff 667062958
F2x_copy 60782415
F2x_div 1574420
F2x_equal 4691699
F2x_equal1 2871644
F2x_flip 1554094
F2x_renormalize 115594257
F2x_set 124722546
F2xqX_div 33173
F3m_coeff 3210422
F3m_copy 0
F3m_set 0
Flm_copy 6262835
Flm_row 8567576
Flv_copy 2510208
Flx_constant 294701
Flx_copy 172062508
Flx_div 1995916
Flx_div_pre 21366890
Flx_equal1 8596888
Flx_lead 969367
Flx_mulu 1094291
FlxqX_div 0
FlxqX_div_pre 165355
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 4525
FpXQX_renormalize 4698222
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 850077
FpXY_Fq_evaly 20587
FpX_div 5435814
FpX_renormalize 142352246
Fp_add 174458273
Fp_addmul 11250360
Fp_center 75352430
Fp_center_i 13973030
Fp_div 1614929
Fp_divu 1898935
Fp_double 20895749
Fp_halve 252334
Fp_inv 36406541
Fp_invsafe 1097389
Fp_mul 182453302
Fp_muls 17780
Fp_mulu 71666587
Fp_neg 28710513
Fp_red 79772778
Fp_sqr 63902259
Fp_sub 147948461
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 568373
FqX_Fq_mul 427380
FqX_add 127694
FqX_ddf 7
FqX_degfact 47786
FqX_deriv 723849
FqX_div 38156
FqX_div_by_X_x 71939
FqX_divrem 0
FqX_extgcd 443065
FqX_factor 140722
FqX_factor_squarefree 7
FqX_gcd 691446
FqX_get_red 6090
FqX_halfgcd 0
FqX_halve 19411
FqX_integ 0
FqX_mul 367203
FqX_mulu 21942
FqX_neg 24956
FqX_normalize 3829
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 3112262
Fq_to_FpXQ 110255
GENbinbase 925011212
QV_isscalar 52338223
Q_abs 7811053
Q_abs_shallow 117544
Qtoss 19838
R_abs 0
R_abs_shallow 13083
RgC_fpnorml2 618944
RgC_gtofp 33695830
RgC_gtomp 574
RgM_dimensions 9402139
RgM_fpnorml2 22297
RgM_gtofp 8177385
RgM_gtomp 21
RgM_minor 1036
RgM_shallowcopy 21419392
RgV_gtofp 56
RgV_is_QV 140040
RgV_is_ZV 31339194
RgV_isin 109234
RgV_isin_i 109234
RgV_isscalar 1140333
RgXQX_div 1904
RgXQX_rem 118444
RgX_coeff 2544064
RgX_copy 103418388
RgX_div 7051836
RgX_equal_var 26803148
RgX_fpnorml2 60531
RgX_gtofp 7127058
RgX_is_QX 385574
RgX_is_ZX 15252597
RgX_is_monomial 3080456
RgX_is_rational 67609
RgX_isscalar 0
RgX_renormalize 347497
RgX_shift_inplace 480561
RgX_shift_inplace_init 480561
RgX_to_RgV 140
Rg_col_ei 1282828
Rg_to_Fq 756
ZC_hnfrem 10688495
ZM_ZV_mod 539138
ZM_hnfrem 326825
ZM_lll 6934002
ZV_ZV_mod 7323026
ZV_dvd 23485
ZV_isscalar 22765712
ZV_to_zv 3190568
ZXQ_mul 2127176
ZXQ_sqr 950726
ZX_equal1 12080
ZX_is_monic 7212055
ZX_renormalize 152364411
Z_ispower 98
Z_issquare 458608
abgrp_get_cyc 11549785
abgrp_get_gen 1653827
abgrp_get_no 392000
absfrac 45238139
absfrac_shallow 27026
addmuliu 404539
addmuliu_inplace 59382506
affc_fixlg 239589
affgr 220535
bid_get_MOD 1990798
bid_get_U 3378442
bid_get_arch 35097
bid_get_archp 2217826
bid_get_cyc 5361754
bid_get_fact 2314022
bid_get_fact2 2025340
bid_get_gen 53326
bid_get_gen_nocheck 0
bid_get_grp 5415656
bid_get_ideal 78295
bid_get_mod 1386586
bid_get_no 0
bid_get_sarch 51226
bid_get_sprk 1991520
bin_copy 476996108
bit_accuracy 2841525485
bit_accuracy_mul 3175054
bit_prec 141445447
bnf_get_clgp 5097968
bnf_get_cyc 3509376
bnf_get_fu 25852
bnf_get_fu_nocheck 288171
bnf_get_gen 1580045
bnf_get_logfu 2702299
bnf_get_nf 9426515
bnf_get_no 8379
bnf_get_reg 641
bnf_get_sunits 1278469
bnf_get_tuN 265171
bnf_get_tuU 290515
bnr_get_bid 1937062
bnr_get_bnf 3632457
bnr_get_clgp 2728781
bnr_get_cyc 2396577
bnr_get_gen 7847
bnr_get_gen_nocheck 70
bnr_get_mod 141071
bnr_get_nf 1260131
bnr_get_no 314601
both_odd 116768099
cbrtr 0
cbrtr_abs 0
cgetalloc 10075
cgetc 963394
cgiv 117626770
checkell_i 4680732
closure_arity 360972160
closure_codestr 312247303
closure_get_code 0
closure_get_data 312209725
closure_get_dbg 13362
closure_get_frame 13030109
closure_get_oper 312229655
closure_get_text 36526
closure_is_variadic 40084168
col_ei 5670492
coltrunc_init 393680
const_col 9623110
const_vec 32884725
const_vecsmall 19043743
constant_coeff 1437605
cxcompotor 17894682
cxnorm 90709205
cxtofp 8930712
cxtoreal 384631
cyc_get_expo 2521889
cyclic_perm 99911
dbllog2r 92872944
degpol 5367702281
div_content 57466
divsBIL 8062721589
ellQp_get_p 1134
ellQp_get_prec 308
ellQp_get_zero 1463
ellR_get_prec 232652
ellR_get_sign 371325
ell_get_a1 7135401
ell_get_a2 5718003
ell_get_a3 6923921
ell_get_a4 6527560
ell_get_a6 7961622
ell_get_b2 5433464
ell_get_b4 2136208
ell_get_b6 3055658
ell_get_b8 2609538
ell_get_c4 8022126
ell_get_c6 8850874
ell_get_disc 11281097
ell_get_j 1296419
ell_get_type 11592194
ell_is_inf 51360556
ellff_get_a4a6 799913
ellff_get_field 2036486
ellinf 1874312
ellnf_get_bnf 126
ellnf_get_nf 2030669
equali1 1212453762
equalim1 139009313
err_get_compo 294
err_get_num 62005
gabsz 0
gaddgs 123138126
gaddz 0
gal_get_den 27608
gal_get_e 91
gal_get_gen 15456
gal_get_group 80149
gal_get_invvdm 27615
gal_get_mod 23758
gal_get_orders 6664
gal_get_p 6041
gal_get_pol 36078
gal_get_roots 32508
gc_all 86224082
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 241478
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 780379
gdiventz 0
gdivsg 528210
gdivz 0
gen_I 1269318
gener_Fq_local 14601
gequalgs 29176
gerepileall 19092858
gerepilecoeffs 2198031
gerepilecopy 227299291
gerepilemany 984890
gerepileupto 1789099148
gerepileuptoint 3944591934
gerepileuptoleaf 1084487118
get_F2x_degree 1927957
get_F2x_mod 2498447
get_F2x_var 2531197
get_F2xqX_degree 200893
get_F2xqX_mod 343
get_F2xqX_var 375501
get_Flx_degree 84549102
get_Flx_mod 25512306
get_Flx_var 67619325
get_FlxqX_degree 318129
get_FlxqX_mod 8033
get_FlxqX_var 264906
get_FpXQX_degree 3640
get_FpXQX_mod 146583
get_FpXQX_var 51784
get_FpX_degree 5929270
get_FpX_mod 3389782
get_FpX_var 7217018
gisdouble 2967517
gmax_shallow 13509948
gmaxsg 0
gmin_shallow 873842
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 21997880
gmulgu 124173903
gmulz 0
gnegz 0
gshiftz 0
gsubgs 1692550
gsubz 0
gtodouble 60545130
gtofp 252179753
gtomp 22428
gtos 85800868
gtou 102640
guncloneNULL 48419318
guncloneNULL_deep 1357800
gval 5796
hash_str 2690497
hash_str_len 18281543
icopy_avma 7804913657
idealchineseinit 4766
idealred 138589
identity_ZV 4333
identity_perm 3115604
identity_zv 3139949
inf_get_sign 1193935
inv_content 0
is_bigint 556751700
is_const_t 4747344366
is_extscalar_t 6960
is_intreal_t 9579804
is_matvec_t 603493531
is_noncalc_t 93642313
is_pm1 2188432275
is_qfb_t 0
is_rational_t 4984146
is_real_t 62553079
is_recursive_t 8424311500
is_scalar_t 314523122
is_universal_constant 291198041
is_vec_t 43361365
isint1 17224222
isintm1 5962561
isintzero 2792647053
ismpzero 9579699
isonstack 7883672048
killblock 1877972
leading_coeff 169554527
leafcopy_avma 551246619
lg_increase 309862904
lgcols 340261602
lgpol 2559015708
lincombii 37795157
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 751967
matpascal 3885
matslice 16546376
mkcol 10177586
mkcol2 156398671
mkcol2s 4415292
mkcol3 88314
mkcol3s 315
mkcol4 103439
mkcol4s 0
mkcol5 94
mkcol6 232379
mkcolcopy 33537
mkcols 40411
mkcomplex 89993676
mkerr 0
mkfrac 33855667
mkfraccopy 4808993
mkfracss 1209535
mkintmod 8024704
mkintmodu 1813
mkmat 4608211
mkmat2 32546824
mkmat22 50524791
mkmat22s 207452
mkmat3 17001
mkmat4 84
mkmat5 0
mkmatcopy 121017
mkmoo 105852
mkoo 1075810
mkpolmod 2991783
mkqfb 27798941
mkquad 69118
mkrfrac 698145
mkrfraccopy 14
mkvec 67926454
mkvec2 181747218
mkvec2copy 114404
mkvec2s 219737
mkvec3 122261604
mkvec3s 524441
mkvec4 6636956
mkvec4s 21
mkvec5 14487561
mkveccopy 122507
mkvecs 161
mkvecsmall 129406167
mkvecsmall2 223901214
mkvecsmall3 100341281
mkvecsmall4 15478415
mkvecsmall5 688706
modpr_get_T 13187551
modpr_get_p 1888691
modpr_get_pr 30052369
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 2510205
mul_denom 10285026
mulsubii 3838798
nbits2extraprec 1474467906
nbits2ndec 214
nbits2nlong 12563700
nbits2prec 185474248
nbrows 153520449
nchar2nlong 120791927
ndec2nbits 8256
ndec2nlong 41087
ndec2prec 32831
nfV_to_scalar_or_alg 26293
nf_get_G 301314
nf_get_M 20772705
nf_get_Tr 22083
nf_get_degree 68772948
nf_get_diff 4465
nf_get_disc 456816
nf_get_index 3581002
nf_get_invzk 9476893
nf_get_pol 94345017
nf_get_r1 22160215
nf_get_r2 4140
nf_get_ramified_primes 59317
nf_get_roots 1517259
nf_get_roundG 1685894
nf_get_sign 516778
nf_get_varn 1167310
nf_get_zk 4382
nf_get_zkden 5061376
nf_get_zkprimpart 5015344
normalize_frac 16727100
odd 2023767641
pari_calloc 46726
pari_err_BUG 14
pari_err_COMPONENT 214
pari_err_CONSTPOL 21
pari_err_COPRIME 84
pari_err_DIM 711
pari_err_DOMAIN 2757
pari_err_FILE 0
pari_err_FILEDESC 36
pari_err_FLAG 98
pari_err_IMPL 525
pari_err_INV 20018
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 7084
pari_err_TYPE 15279
pari_err_TYPE2 3493
pari_err_VAR 371
pari_free 490249071
pari_malloc 720558462
pari_realloc 1862
pari_realloc_ip 2125938
pari_stack_alloc 691303506
pari_stack_base 696570631
pari_stack_delete 5285529
pari_stack_init 5694705
pari_stack_new 598297758
pari_stack_pushp 5767
perm_conj 418299
perm_inv 2768748
perm_mul 79672966
perm_sqr 728
pol0_F2x 13268658
pol0_Flx 101965765
pol1_F2x 3953550
pol1_Flx 54679092
pol_0 34772703
pol_1 4381321
pol_x 3550511
pol_xn 2223752
pol_xnall 294
polx_F2x 1078765
polx_Flx 37615727
polx_zx 0
polxn_Flx 371
powIs 1561
powii 42910626
pr_get_e 15726749
pr_get_f 25349104
pr_get_gen 11509232
pr_get_p 89377839
pr_get_tau 47851158
pr_is_inert 16400241
pr_norm 1066899
prec2lg 4457980132
prec2nbits 104290949
prec2nbits_mul 570916
prec2ndec 9750
precdbl 475116
qfb_disc 18474969
qfb_disc3 4848418
qfb_is_qfi 68055533
quad_disc 1078
quadnorm 69860
random_Fq 0
remsBIL 7975007957
rnf_get_absdegree 1381557
rnf_get_alpha 1092
rnf_get_degree 2476851
rnf_get_disc 315
rnf_get_idealdisc 1190
rnf_get_index 105
rnf_get_invzk 1225
rnf_get_k 1078
rnf_get_map 129268
rnf_get_nf 708280
rnf_get_nfdegree 20111
rnf_get_nfpol 242257
rnf_get_nfvarn 4655
rnf_get_nfzk 6083
rnf_get_pol 2796059
rnf_get_polabs 297244
rnf_get_ramified_primes 2380
rnf_get_varn 574
rnf_get_zk 4361
row 762672
row_i 987
rowcopy 204988
rowpermute 14365872
rowslice 77981908
rowslicepermute 181982
rowsplice 273
ser_isexactzero 10079038
shallowcopy 25805367
sqrfrac 4129476
sqrti 6584440
sqrtnr 2792805
sqrtr 79859257
sstoQ 1074486
sturm 385
submulii 32723956
submuliu 7693
submuliu_inplace 59922249
truecoef 0
trunc_safe 0
ulogint 1717288
upr_norm 343931
uutoQ 158074137
vec_append 3431936
vec_ei 1708939
vec_lengthen 18941
vec_prepend 300938
vec_setconst 0
vec_shorten 11549
vec_to_vecsmall 4015501
veclast 6917465
vecmodii 0
vecmoduu 49784
vecpermute 19822037
vecreverse 697025
vecreverse_inplace 2570
vecslice 637462272
vecslicepermute 2631215
vecsmall_append 4065069
vecsmall_coincidence 0
vecsmall_concat 1457737
vecsmall_copy 4317572
vecsmall_ei 495270
vecsmall_indexmax 21
vecsmall_indexmin 21
vecsmall_isin 84
vecsmall_lengthen 526
vecsmall_lexcmp 7208565
vecsmall_max 1010687
vecsmall_min 1442
vecsmall_pack 84
vecsmall_prefixcmp 108088071
vecsmall_prepend 186796
vecsmall_reverse 3059
vecsmall_shorten 72599
vecsmall_to_col 7760737
vecsmall_to_vec 510157
vecsmall_to_vec_inplace 3304
vecsmallpermute 77482160
vecsmalltrunc_append 99878159
vecsmalltrunc_init 186740905
vecsplice 354712
vectrunc_append 15252003
vectrunc_append_batch 10864
vectrunc_init 11716429
zc_to_ZC 7746555
zero_F2m 0
zero_F2m_copy 838825
zero_F2v 3618864
zero_F2x 1350
zero_Flm 2767320
zero_Flm_copy 232093
zero_Flv 58670719
zero_Flx 1429563
zero_zm 0
zero_zv 36104119
zero_zx 0
zerocol 118701405
zeromat 108862
zeromatcopy 14018380
zeropadic 855632
zeropadic_shallow 15358
zeropol 14725001
zeroser 138698
zerovec 26630000
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 2183319
zv_to_ZV 501596
zv_to_zx 104146
zx_renormalize 14049
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.16