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 30565-738e569de9) Lines: 1420 1532 92.7 %
Date: 2025-11-30 09:23:42 Functions: 648 704 92.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2xX_shift 0
F3m_copy 0
F3m_set 0
FlxqX_div 0
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQ_add 0
FpXQ_sub 0
FqXQ_add 0
FqXQ_div 0
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_pow 0
FqXQ_sqr 0
FqXQ_sub 0
FqX_divrem 0
FqX_halfgcd 0
FqX_integ 0
FqXn_exp 0
FqXn_sqr 0
R_abs 0
RgX_isscalar 0
bid_get_gen_nocheck 0
bid_get_no 0
cbrtr 0
cbrtr_abs 0
closure_get_code 0
gchar_get_U 0
gchar_get_hnf 0
gmaxsg 0
gminsg 0
inv_content 0
is_qfb_t 0
mkcol4s 0
mkerr 0
mkmat5 0
pari_err_FILE 0
pari_err_MAXPRIME 0
pari_err_PACKAGE 0
polx_zx 0
random_Fq 0
truecoef 0
trunc_safe 0
vec_setconst 0
vecmodii 0
vecsmall_coincidence 0
zero_F2m 0
zero_zm 0
zero_zx 0
zm_copy 0
zm_row 0
zm_to_zxV 0
zx_shift 0
zx_to_zv 0
FqX_ddf 7
FqX_factor_squarefree 7
mkrfraccopy 14
pari_err_BUG 14
znstar_get_no 14
RgM_gtomp 21
mkvec4s 21
pari_err_CONSTPOL 21
vecsmall_indexmax 21
vecsmall_indexmin 21
pari_err_FILEDESC 36
F2v_ei 42
RgV_gtofp 56
pari_err_IRREDPOL 63
pari_err_ROOTS0 63
bnr_get_gen_nocheck 70
mkmat4 84
pari_err_COPRIME 84
vecsmall_isin 84
vecsmall_pack 84
gal_get_e 91
mkcol5 94
Z_ispower 98
pari_err_FLAG 98
pari_err_PRIME 98
rnf_get_index 105
ellnf_get_bnf 126
RgX_to_RgV 140
pari_err_OVERFLOW 156
mkvecs 168
FqX_to_mod 175
pari_err_COMPONENT 214
nbits2ndec 228
pari_err_PREC 238
pari_err_PRIORITY 238
zm_transpose 266
rowsplice 273
err_get_compo 294
pol_xnall 294
ellQp_get_prec 308
mkcol3s 315
gchar_get_nfree 322
gchar_get_ntors 322
get_F2xqX_mod 343
rnf_get_disc 357
pari_err_VAR 371
polxn_Flx 371
sturm 385
pari_err_OP 406
pari_err_IMPL 539
vecsmall_lengthen 547
RgC_gtomp 574
rnf_get_varn 574
gchar_get_r2 623
gchar_set_HUUi 630
gchar_set_nalg 630
gchar_set_nfree 630
gchar_set_ntors 630
bnf_get_reg 648
pari_err_DIM 718
perm_sqr 728
Rg_to_Fq 756
F2m_set 798
gchar_set_m0 945
row_i 987
RgM_minor 1036
quad_disc 1085
ellQp_get_p 1134
gchar_copy_precs 1225
gchar_set_prec 1225
rnf_get_invzk 1225
rnf_get_k 1225
locs_get_Lgenfil 1288
locs_get_famod 1288
FqX_powu 1295
pari_err_MODULUS 1316
zero_F2x 1350
rnf_get_idealdisc 1386
rnf_get_alpha 1428
ellQp_get_zero 1463
powIs 1561
gchar_set_basis 1575
gchar_set_cyc 1575
gchar_get_sfu 1743
gchar_set_evalprec 1813
mkintmodu 1813
gchar_get_nm 1869
pari_realloc 1890
RgXQX_div 1904
mkpadic 2009
gchar_get_nalg 2044
gchar_set_nf 2110
gchar_set_u0 2121
vecsmall_min 2345
vecreverse_inplace 2605
rnf_get_ramified_primes 2849
pari_err_DOMAIN 2862
gchar_set_nfprec 2968
vecsmall_reverse 3052
vecsmall_to_vec_inplace 3304
gchar_get_m0 3318
pari_err_TYPE2 3493
get_FpXQX_degree 3589
matpascal 3983
gchar_get_evalprec 4011
gchar_get_modP 4095
FqX_normalize 4144
nf_get_r2 4154
gchar_get_u0 4252
nf_get_zk 4382
nf_get_diff 4438
F2v_copy 4487
FpXQX_div 4526
rnf_get_zk 4830
rnf_get_nfvarn 4886
idealchineseinit 5427
pari_stack_pushp 5851
gal_get_p 6020
FqX_get_red 6090
gval 6230
FqXn_expint 6590
gal_get_orders 6678
is_extscalar_t 6876
pari_err_SQRTN 7084
FqXn_inv 7126
rnf_get_nfzk 7245
FqX_roots 7273
submuliu 7742
bnr_get_gen 7847
get_FlxqX_mod 8033
identity_ZV 8113
gchar_get_mod 8225
locs_get_mod 8225
ndec2nbits 8270
FqX_gcd 8288
bnf_get_no 8372
prec2ndec 9778
cgetalloc 10166
gchar_get_Ui 10983
vec_shorten 11557
vectrunc_append_batch 12306
ZX_equal1 12893
R_abs_shallow 13097
gchar_get_nfprec 13468
closure_get_dbg 13621
zx_renormalize 14049
pari_err_TYPE 15370
gal_get_gen 15449
znstar_get_gen 16150
gchar_get_cyc 16177
mkmat3 17001
zeropadic_shallow 17024
gchar_get_r1 17444
Fp_muls 17780
gchar_get_prec 18795
vec_lengthen 18946
FqX_halve 19411
pari_err_INV 20018
FpXY_Fq_evaly 20587
rnf_get_nfdegree 21455
FqX_mulu 21942
nf_get_Tr 22083
gtomp 22428
FqXQ_mul 22766
RgM_fpnorml2 22788
ZV_dvd 23485
gal_get_mod 23772
FqX_neg 24956
FqX_red 25354
bnf_get_fu 25859
nfV_to_scalar_or_alg 26300
gal_get_den 27874
gal_get_invvdm 27881
absfrac_shallow 28237
zerovec_block 28947
gequalgs 29176
gener_Fq_local 29932
gal_get_roots 32753
gchar_get_basis 32816
F2xqX_div 33173
ndec2prec 33279
mkcolcopy 33502
Qtoss 35322
gal_get_pol 36337
gchar_get_S 36995
gchar_get_ns 36995
closure_get_text 37051
gchar_get_nc 37261
FqX_rem 37743
F2v_to_F2x 37835
FqX_div 38567
FqX_deriv 40061
mkcols 40411
bid_get_arch 41188
ndec2nlong 41549
znstar_get_Ui 46788
pari_calloc 47699
FqX_degfact 47786
bid_get_sarch 48594
vecmoduu 49784
gchar_get_loccyc 50519
get_FpXQX_var 51630
locs_get_cyc 52136
div_content 58476
RgX_fpnorml2 61607
err_get_num 62523
bid_get_gen 64274
nf_get_ramified_primes 64813
RgX_is_rational 68309
FqX_sub 68607
mkquad 69118
FqX_div_by_X_x 69629
quadnorm 69881
FqX_sqr 71855
bid_get_ideal 72842
Fq_to_FpXQ 73792
vecsmall_shorten 74578
bnr_get_mod 77116
gal_get_group 80394
mkcol3 88314
gtou 98319
cyclic_perm 99911
mkcol4 103467
zv_to_zx 104146
mkmoo 108851
zeromat 109135
RgV_isin 110144
RgV_isin_i 110144
mkvec2copy 114570
Q_abs_shallow 120244
mkmatcopy 122242
mkveccopy 122521
RgXQX_rem 127635
FqX_add 127694
rnf_get_map 135659
idealred 138522
zeroser 138908
RgV_is_QV 140757
FqX_factor 141072
get_FpXQX_mod 146583
FlxqX_div_pre 165416
znstar_get_U 176107
rowslicepermute 184684
vecsmall_prepend 186991
gchar_get_DLdata 190673
locs_get_Lsprk 193935
F2m_copy 200497
get_F2xqX_degree 200851
rowcopy 204988
gchar_get_bnf 205373
mkmat22s 207578
locs_get_m_infty 209475
mkvec2s 220416
mkcol6 232589
ellR_get_prec 232750
zero_Flm_copy 235927
gchar_get_nf 243946
Fp_halve 247348
affc_fixlg 249621
rnf_get_nfpol 255354
znstar_get_cyc 262088
FqXn_mul 263403
get_FlxqX_var 264420
bnr_get_no 277490
gchar_get_zm 281911
bnf_get_tuN 283013
bnf_get_fu_nocheck 289081
nf_get_G 303577
bnf_get_tuU 303586
vec_prepend 313999
get_FlxqX_degree 317565
rnf_get_polabs 327628
Flx_constant 334023
cxtoreal 337206
upr_norm 346133
RgX_renormalize 349807
abgrp_get_no 355183
ZM_hnfrem 363855
FqX_mul 367814
ellR_get_sign 371535
get_F2xqX_var 375375
vecsplice 384918
RgX_is_QX 400138
perm_conj 418299
FqX_Fq_mul 427289
FqX_extgcd 445047
Z_issquare 458923
nf_get_disc 463866
precdbl 475514
RgX_shift_inplace 479367
RgX_shift_inplace_init 479367
zv_to_ZV 503010
vecsmall_to_vec 511809
nf_get_sign 519552
mkvec3s 524441
gdivsg 531592
addmuliu 535773
FqX_Fp_mul 572114
prec2nbits_mul 581163
vecsmall_ei 584714
ZM_ZV_mod 596634
RgC_fpnorml2 622070
FqX_is_squarefree 683802
vecreverse 697235
mkrfrac 698439
coltrunc_init 740250
logint 754892
gcmpgs 761910
row 763997
rnf_get_nf 786030
ellff_get_a4a6 800027
zero_F2m_copy 845094
FpXX_renormalize 849896
zeropadic 855699
gmin_shallow 878347
affgr 898866
ZXQ_sqr 961100
cgetc 975459
Flx_lead 980590
polx_F2x 1078495
pr_norm 1088598
sstoQ 1097215
Fp_invsafe 1100560
Flx_mulu 1105503
vecsmall_max 1164703
mkfracss 1209563
RgV_isscalar 1210304
gen_I 1269852
RgX_is_monomial 1331798
mkoo 1332032
bnf_get_sunits 1367778
bnr_get_nf 1368106
rnf_get_absdegree 1392746
zero_Flx 1426902
constant_coeff 1441408
guncloneNULL_deep 1447278
Rg_col_ei 1451352
inf_get_sign 1453140
vecsmall_concat 1464429
nf_get_varn 1503726
bid_get_mod 1521921
F2m_flip 1554050
F2v_flip 1554050
F2x_flip 1554050
F2x_div 1570079
uutoQ 1600198
nf_get_roots 1627837
bnf_get_gen 1680298
vec_ei 1714591
ulogint 1717019
gsubgs 1724809
mkvecsmall5 1731128
nf_get_roundG 1746606
abgrp_get_gen 1765019
ellinf 1869381
modpr_get_p 1888432
get_F2x_degree 1928974
killblock 1931925
Flx_div 1999056
ellnf_get_nf 2027652
ellff_get_field 2036854
bnr_get_bid 2045858
ell_get_j 2126227
bid_get_MOD 2157249
bid_get_sprk 2157970
ZXQ_mul 2162077
zv_copy 2184016
bid_get_fact2 2201567
gc_slice 2204893
pol_xn 2249981
pari_realloc_ip 2267886
bid_get_archp 2397067
bid_get_fact 2498910
get_F2x_mod 2499160
rnf_get_degree 2506307
bnr_get_cyc 2522325
get_F2x_var 2534107
ell_get_b4 2550216
Flv_copy 2555266
mul_content 2654083
RgX_coeff 2669861
vecslicepermute 2689667
hash_str 2756815
cyc_get_expo 2757786
perm_inv 2782948
sqrtnr 2808776
bnr_get_clgp 2830008
zero_Flm 2830230
rnf_get_pol 2845164
znstar_get_pe 2869063
F2x_equal1 2873986
bnf_get_logfu 2874719
gisdouble 2988044
mkpolmod 3105125
Fq_red 3106374
bit_accuracy_mul 3175472
ZV_to_zv 3211413
identity_perm 3242666
F3m_coeff 3256769
identity_zv 3267016
znstar_get_conreygen 3290176
ell_get_b8 3297414
get_FpX_mod 3394559
vec_append 3465581
zero_F2v 3648067
bid_get_U 3680230
bnf_get_cyc 3686068
nf_get_index 3711341
bnr_get_bnf 3750903
pol_1 3756449
pol_x 3858389
ell_get_b6 3863115
mulsubii 3881934
pol1_F2x 3957266
vec_to_vecsmall 4036826
vecsmall_append 4111378
sqrfrac 4148154
vecsmall_copy 4404204
mkcol2s 4416244
F2x_equal 4657828
FpXQX_renormalize 4693737
mkmat 4750927
qfb_disc3 4990612
mkfraccopy 4999269
is_rational_t 5035316
bnf_get_clgp 5374916
nf_get_zkprimpart 5416722
nf_get_zkden 5462559
FpX_div 5581249
checkell_i 5593292
pari_stack_delete 5634610
isintm1 5711186
bid_get_cyc 5739520
bid_get_grp 5804369
col_ei 5925968
pari_stack_init 6084115
get_FpX_degree 6424891
Flm_copy 6433739
sqrti 6666044
get_FpX_var 6957856
RgX_div 7000740
vecsmall_lexcmp 7043259
ell_get_a2 7106181
ZM_lll 7112427
RgX_gtofp 7147660
znstar_get_faN 7331711
ell_get_b2 7371030
ZX_is_monic 7376020
zc_to_ZC 7823516
vecsmall_to_col 7837698
znstar_get_conreycyc 7979693
F2m_coeff 8038890
Q_abs 8063973
mkintmod 8092623
ZV_ZV_mod 8131286
RgM_gtofp 8252443
Flx_equal1 8331193
gc_INT_affii 8486607
ell_get_a4 8536722
Flm_row 8742312
ell_get_a3 8814049
ell_get_a1 8997081
cxtofp 9084874
veclast 9372669
ismpzero 9583870
is_intreal_t 9583982
const_col 9729875
RgM_dimensions 9742277
nf_get_invzk 9766161
bnf_get_nf 9863703
mkvec4 10106296
ser_isexactzero 10120284
ell_get_a6 10370960
mkcol 10640914
ZC_hnfrem 10690819
mul_denom 10710320
ell_get_c4 11018333
Fp_addmul 11384761
pr_get_gen 12062754
vectrunc_init 12066640
abgrp_get_cyc 12230153
F2v_clear 12355392
F2x_clear 12355402
ell_get_type 12499279
nbits2nlong 12677923
pol0_F2x 13240729
ell_get_c6 13474651
gmax_shallow 13510220
modpr_get_T 13867713
closure_get_frame 14170438
zeromatcopy 14240245
rowpermute 14709734
Fp_div 15035130
Fp_divu 15129588
mkvec5 15185248
pr_get_e 15952944
vectrunc_append 16161866
ell_get_disc 16815617
matslice 16817791
pr_is_inert 16910254
normalize_frac 17205173
isint1 17586638
mkvecsmall4 17825103
Fp_center_i 18053029
cxcompotor 18221463
qfb_disc 18514537
const_vecsmall 19707203
vecpermute 20529658
nf_get_M 21171992
Flx_div_pre 21705496
RgM_shallowcopy 22170733
Fp_double 22311159
RgX_is_ZX 22422748
gmulgs 22499933
nf_get_r1 22892523
ZV_isscalar 23098190
Fp_inv 23440206
get_Flx_mod 25604291
pr_get_f 26041827
RgX_equal_var 26883188
shallowcopy 27640201
mkqfb 27919334
zerovec 28455616
modpr_get_pr 31238448
Fp_neg 31478984
hash_str_len 31550432
RgV_is_ZV 32167242
submulii 32847732
mkmat2 33657904
RgC_gtofp 34012833
const_vec 34480579
zero_zv 36736825
polx_Flx 37829585
lincombii 38199797
znstar_get_N 38655073
mkfrac 41641833
zeropol 42358743
powii 43178353
is_vec_t 43964184
closure_is_variadic 44821374
absfrac 46643654
guncloneNULL 48232088
pr_get_tau 48872366
mkmat22 50276198
ell_is_inf 52432845
QV_isscalar 54402080
pol1_Flx 55079821
zero_Flv 59495714
addmuliu_inplace 59698866
submuliu_inplace 60197403
F2x_copy 60450305
gtodouble 60797901
is_real_t 62063859
qfb_is_qfi 62945468
Fp_sqr 64859937
get_Flx_var 68399361
Fp_mulu 70732346
mkvec 71145934
nf_get_degree 71351598
Fp_center 77233864
vecsmallpermute 78736660
rowslice 79347755
sqrtr 80366994
perm_mul 80932300
Fp_red 82084860
pol_0 83002159
get_Flx_degree 83757253
gtos 85854578
is_noncalc_t 85864349
cxnorm 90945503
mkcomplex 91636780
pr_get_p 91709670
dbllog2r 92831068
nf_get_pol 98060175
F2v_set 101404088
vecsmalltrunc_append 101543683
cgiv 102119724
RgX_copy 103409240
pol0_Flx 103507725
prec2nbits 103961690
mkvecsmall3 104041095
vecsmall_prefixcmp 108088071
gc_all 110007556
F2x_renormalize 115181227
mkvec3 122207638
zerocol 122289450
gaddgs 123248627
both_odd 123991471
F2x_set 124716730
nchar2nlong 127412402
mkvecsmall 131682158
equalim1 139505881
bit_prec 142677623
FpX_renormalize 144579738
ZX_renormalize 155001611
mkcol2 156852251
nbrows 157481263
leading_coeff 170557455
Flx_copy 173798828
Fp_add 181635177
mkvec2 185450171
nbits2prec 186144979
vecsmalltrunc_init 190974947
Fp_mul 201084860
Fp_sub 203937005
mkvecsmall2 233637590
gtofp 254251004
gc_GEN 256219265
gmulgu 282059385
lg_increase 318873756
closure_get_data 321332717
closure_get_oper 321358385
closure_codestr 321382439
is_universal_constant 325893572
lgcols 350258733
closure_arity 371248303
is_scalar_t 375669978
bin_copy 497346593
pari_free 510759463
is_bigint 562606747
leafcopy_avma 577426629
vecslice 656313876
is_matvec_t 659358001
F2v_coeff 661327935
F2x_coeff 667876984
pari_malloc 746656117
pari_stack_new 924909792
GENbinbase 964392878
pari_stack_alloc 1019616380
pari_stack_base 1025208604
gc_leaf 1138474715
equali1 1175184717
nbits2extraprec 1456639547
gc_upto 1949177062
odd 2084580937
is_pm1 2204167210
lgpol 2690443548
isintzero 2838167689
bit_accuracy 3162840427
gc_INT 4104081629
prec2lg 4466231733
is_const_t 4888405758
degpol 5520346650
remsBIL 8005811750
icopy_avma 8035550303
divsBIL 8096736436
isonstack 8261215839
is_recursive_t 9239230474

Generated by: LCOV version 1.16