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 30563-682842a727) Lines: 1420 1532 92.7 %
Date: 2025-11-29 09:23:24 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 11556
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 22084
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 37836
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 58477
RgX_fpnorml2 61607
err_get_num 62523
bid_get_gen 64274
nf_get_ramified_primes 64813
RgX_is_rational 68312
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 74580
bnr_get_mod 77119
gal_get_group 80394
mkcol3 88314
gtou 98308
cyclic_perm 99911
mkcol4 103467
zv_to_zx 104146
mkmoo 108847
zeromat 109069
RgV_isin 110144
RgV_isin_i 110144
mkvec2copy 114569
Q_abs_shallow 120240
mkmatcopy 122235
mkveccopy 122521
RgXQX_rem 127635
FqX_add 127694
rnf_get_map 135659
idealred 138521
zeroser 138908
RgV_is_QV 140762
FqX_factor 141072
get_FpXQX_mod 146583
FlxqX_div_pre 165414
znstar_get_U 176107
rowslicepermute 184696
vecsmall_prepend 186991
gchar_get_DLdata 190673
locs_get_Lsprk 193935
F2m_copy 200506
get_F2xqX_degree 200851
rowcopy 204988
gchar_get_bnf 205373
mkmat22s 207578
locs_get_m_infty 209475
mkvec2s 220418
mkcol6 232589
ellR_get_prec 232750
zero_Flm_copy 235918
gchar_get_nf 243946
Fp_halve 247348
affc_fixlg 249619
rnf_get_nfpol 255354
znstar_get_cyc 262088
FqXn_mul 263403
get_FlxqX_var 264420
bnr_get_no 277499
gchar_get_zm 281911
bnf_get_tuN 283004
bnf_get_fu_nocheck 289091
nf_get_G 303478
bnf_get_tuU 303576
vec_prepend 313994
get_FlxqX_degree 317565
rnf_get_polabs 327628
Flx_constant 334028
cxtoreal 337203
upr_norm 346136
RgX_renormalize 349807
abgrp_get_no 355191
ZM_hnfrem 363861
FqX_mul 367812
ellR_get_sign 371535
get_F2xqX_var 375375
vecsplice 384918
RgX_is_QX 400151
perm_conj 418299
FqX_Fq_mul 427281
FqX_extgcd 445050
Z_issquare 458922
nf_get_disc 463863
precdbl 475502
RgX_shift_inplace 479366
RgX_shift_inplace_init 479366
zv_to_ZV 503010
vecsmall_to_vec 511809
nf_get_sign 519551
mkvec3s 524441
gdivsg 531591
addmuliu 535737
FqX_Fp_mul 572124
prec2nbits_mul 581166
vecsmall_ei 584747
ZM_ZV_mod 596612
RgC_fpnorml2 622076
FqX_is_squarefree 683802
vecreverse 697235
mkrfrac 698439
coltrunc_init 740250
logint 754888
gcmpgs 761929
row 764011
rnf_get_nf 786030
ellff_get_a4a6 800037
zero_F2m_copy 845111
FpXX_renormalize 849896
zeropadic 855735
gmin_shallow 878310
affgr 898866
ZXQ_sqr 961012
cgetc 975455
Flx_lead 979976
polx_F2x 1078431
pr_norm 1088464
sstoQ 1097215
Fp_invsafe 1100548
Flx_mulu 1105468
vecsmall_max 1164689
mkfracss 1209563
RgV_isscalar 1210306
gen_I 1269832
RgX_is_monomial 1331887
mkoo 1332112
bnf_get_sunits 1367780
bnr_get_nf 1368125
rnf_get_absdegree 1392746
zero_Flx 1426633
constant_coeff 1441402
guncloneNULL_deep 1442417
Rg_col_ei 1451337
inf_get_sign 1453219
vecsmall_concat 1464336
nf_get_varn 1503738
bid_get_mod 1521922
F2m_flip 1554047
F2v_flip 1554047
F2x_flip 1554047
F2x_div 1570098
uutoQ 1600198
nf_get_roots 1627739
bnf_get_gen 1680317
vec_ei 1714606
ulogint 1722842
gsubgs 1724809
mkvecsmall5 1731090
nf_get_roundG 1746514
abgrp_get_gen 1765032
ellinf 1869412
modpr_get_p 1888431
get_F2x_degree 1928917
killblock 1929500
Flx_div 1999014
ellnf_get_nf 2027635
ellff_get_field 2036856
bnr_get_bid 2045866
ell_get_j 2126227
bid_get_MOD 2157261
bid_get_sprk 2157987
ZXQ_mul 2161978
zv_copy 2183964
bid_get_fact2 2201580
gc_slice 2204819
pol_xn 2249927
pari_realloc_ip 2268018
bid_get_archp 2397074
bid_get_fact 2498919
get_F2x_mod 2499132
rnf_get_degree 2506307
bnr_get_cyc 2522340
get_F2x_var 2534046
ell_get_b4 2550216
Flv_copy 2555219
mul_content 2654043
RgX_coeff 2669861
vecslicepermute 2689817
hash_str 2756815
cyc_get_expo 2757787
perm_inv 2782859
sqrtnr 2808606
bnr_get_clgp 2830016
zero_Flm 2830146
rnf_get_pol 2845164
znstar_get_pe 2869063
F2x_equal1 2873959
bnf_get_logfu 2874715
gisdouble 2987453
mkpolmod 3105127
Fq_red 3106425
bit_accuracy_mul 3175472
ZV_to_zv 3211415
identity_perm 3242666
F3m_coeff 3256668
identity_zv 3267016
znstar_get_conreygen 3290176
ell_get_b8 3297414
get_FpX_mod 3394536
vec_append 3465556
zero_F2v 3648082
bid_get_U 3680239
bnf_get_cyc 3686064
nf_get_index 3711337
bnr_get_bnf 3750895
pol_1 3756367
pol_x 3858431
ell_get_b6 3863115
mulsubii 3881365
pol1_F2x 3956789
vec_to_vecsmall 4036828
vecsmall_append 4111371
sqrfrac 4148324
vecsmall_copy 4404147
mkcol2s 4416244
F2x_equal 4657166
FpXQX_renormalize 4693512
mkmat 4750846
qfb_disc3 4990563
mkfraccopy 4999317
is_rational_t 5035327
bnf_get_clgp 5374929
nf_get_zkprimpart 5416705
nf_get_zkden 5462613
FpX_div 5581150
checkell_i 5593349
pari_stack_delete 5617671
isintm1 5711057
bid_get_cyc 5739532
bid_get_grp 5804386
col_ei 5925921
pari_stack_init 6083989
get_FpX_degree 6424891
Flm_copy 6433575
sqrti 6665941
get_FpX_var 6957809
RgX_div 7000740
vecsmall_lexcmp 7043259
ell_get_a2 7106177
ZM_lll 7112323
RgX_gtofp 7147599
znstar_get_faN 7331711
ell_get_b2 7371043
ZX_is_monic 7375986
zc_to_ZC 7823598
vecsmall_to_col 7837779
znstar_get_conreycyc 7979693
F2m_coeff 8038867
Q_abs 8064115
mkintmod 8092807
ZV_ZV_mod 8131299
RgM_gtofp 8252389
Flx_equal1 8331153
gc_INT_affii 8489966
ell_get_a4 8536718
Flm_row 8741873
ell_get_a3 8814058
ell_get_a1 8997090
cxtofp 9083902
veclast 9372662
ismpzero 9583615
is_intreal_t 9583728
const_col 9729902
RgM_dimensions 9742107
nf_get_invzk 9766075
bnf_get_nf 9863726
mkvec4 10106262
ser_isexactzero 10120284
ell_get_a6 10370956
mkcol 10640933
ZC_hnfrem 10690937
mul_denom 10710507
ell_get_c4 11018441
Fp_addmul 11440389
pr_get_gen 12062502
vectrunc_init 12066878
abgrp_get_cyc 12230182
F2v_clear 12355382
F2x_clear 12355387
ell_get_type 12499437
nbits2nlong 12677518
pol0_F2x 13237878
ell_get_c6 13474848
gmax_shallow 13510220
modpr_get_T 13867732
closure_get_frame 14170176
zeromatcopy 14240049
rowpermute 14709501
Fp_div 15035159
Fp_divu 15129567
mkvec5 15185365
pr_get_e 15952511
vectrunc_append 16161058
ell_get_disc 16815822
matslice 16817516
pr_is_inert 16909868
normalize_frac 17205174
isint1 17586500
mkvecsmall4 17837505
Fp_center_i 18062023
cxcompotor 18219575
qfb_disc 18514492
const_vecsmall 19706871
vecpermute 20531316
nf_get_M 21171654
Flx_div_pre 21706050
RgM_shallowcopy 22170211
RgX_is_ZX 22422666
Fp_double 22429285
gmulgs 22502338
nf_get_r1 22892276
ZV_isscalar 23097813
Fp_inv 23439993
get_Flx_mod 25605027
pr_get_f 26041092
RgX_equal_var 26883192
shallowcopy 27639962
mkqfb 27919222
zerovec 28455605
modpr_get_pr 31238456
Fp_neg 31477765
hash_str_len 31550264
RgV_is_ZV 32167248
submulii 32847732
mkmat2 33657855
RgC_gtofp 34012713
const_vec 34481542
zero_zv 36735795
polx_Flx 37834673
lincombii 38188438
znstar_get_N 38655073
mkfrac 41642111
zeropol 42358739
powii 43178227
is_vec_t 43964171
closure_is_variadic 44820947
absfrac 46643882
guncloneNULL 48227111
pr_get_tau 48871357
mkmat22 50278867
ell_is_inf 52456224
QV_isscalar 54401964
pol1_Flx 55082480
zero_Flv 59493482
addmuliu_inplace 59703178
submuliu_inplace 60198906
F2x_copy 60411003
gtodouble 60795183
is_real_t 62063858
qfb_is_qfi 62955949
Fp_sqr 65204644
get_Flx_var 68403098
Fp_mulu 70839254
mkvec 71176676
nf_get_degree 71350983
Fp_center 77269309
vecsmallpermute 78735476
rowslice 79347784
sqrtr 80364649
perm_mul 80930974
Fp_red 82086326
pol_0 83002190
get_Flx_degree 83759683
gtos 85854571
is_noncalc_t 85864468
cxnorm 90943988
mkcomplex 91626342
pr_get_p 91708570
dbllog2r 92828958
nf_get_pol 98058602
F2v_set 101404127
vecsmalltrunc_append 101568219
cgiv 102123227
RgX_copy 103409022
pol0_Flx 103505912
prec2nbits 103962058
mkvecsmall3 104051380
vecsmall_prefixcmp 108088071
gc_all 110007675
F2x_renormalize 115158195
mkvec3 122209974
zerocol 122288239
gaddgs 123248616
both_odd 123927586
F2x_set 124700663
nchar2nlong 127411187
mkvecsmall 131678098
equalim1 139505848
bit_prec 142675400
FpX_renormalize 144578501
ZX_renormalize 154992571
mkcol2 156867279
nbrows 157478541
leading_coeff 170557387
Flx_copy 173812540
Fp_add 181834173
mkvec2 185506524
nbits2prec 186141376
vecsmalltrunc_init 191088883
Fp_mul 201192894
Fp_sub 204202459
mkvecsmall2 233641075
gtofp 254253914
gc_GEN 256225818
gmulgu 282059385
lg_increase 319185091
closure_get_data 321369338
closure_get_oper 321398174
closure_codestr 321419979
is_universal_constant 325884409
lgcols 350252747
closure_arity 371283485
is_scalar_t 375670654
bin_copy 497341209
pari_free 510748919
is_bigint 562613758
leafcopy_avma 577378632
vecslice 656294004
is_matvec_t 659388534
F2v_coeff 661327685
F2x_coeff 667844768
pari_malloc 746650945
pari_stack_new 924962918
GENbinbase 964384035
pari_stack_alloc 1019670623
pari_stack_base 1025243081
gc_leaf 1138774947
equali1 1175188414
nbits2extraprec 1456612373
gc_upto 1949180816
odd 2084941098
is_pm1 2204069074
lgpol 2691110675
isintzero 2838300099
bit_accuracy 3162727524
gc_INT 4105211558
prec2lg 4466532623
is_const_t 4889038139
degpol 5521584353
remsBIL 8006298597
icopy_avma 8036130051
divsBIL 8097117276
isonstack 8262851424
is_recursive_t 9239028619

Generated by: LCOV version 1.16