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

Generated by: LCOV version 1.16