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 - kernel/none - level1.h (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29804-254f602fce) Lines: 607 765 79.3 %
Date: 2024-12-18 09:08:59 Functions: 219 285 76.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4296281673
Fl_addmul_pre 7459476303
Fl_addmulmul_pre 55906088
Fl_center 4023647
Fl_div 33078379
Fl_double 448441803
Fl_ellj_pre 223464
Fl_halve 16963493
Fl_mul 2367009928
Fl_mul_pre 3923268592
Fl_neg 705876161
Fl_sqr 92030464
Fl_sqr_pre 2053426487
Fl_sub 7184282806
Fl_triple 89592052
Mod16 277446
Mod2 2024379
Mod32 199255
Mod4 44560508
Mod64 0
Mod8 2070075
abscmpiu 35858298
abscmpui 35858368
absequaliu 41840023
absequalui 43588449
absi 2056237002
absi_shallow 61529310
absr 140
absrnz_equal1 4508032
absrnz_equal2n 1276478
addii 12103856283
addiiz 0
addir 474062420
addirz 0
addis 179607608
addiu 98112783
addri 1102142
addriz 0
addrr 2849136186
addrrz 1307127
addrs 12130482
addsi 304786991
addsiz 0
addsrz 0
addss 25067
addssz 0
addui 101589382
adduu 3387681343
affectsign 0
affectsign_safe 10517586
affii 924079023
affiz 282555
affrr_fixlg 55170159
affsi 6167902
affsr 489316117
affsz 0
affui 45447943
affur 13418165
ceildivuu 3713569
cgetg 24005553915
cgetg_block 372709
cgetg_copy 1294105318
cgeti 26095144047
cgetineg 263723851
cgetipos 16004662158
cgetr 1836045815
cgetr_block 42528
cmpir 9222723
cmpis 4091577
cmpiu 9665770
cmpri 282127
cmprs 40996
cmpsi 4322711
cmpsr 814589
cmpss 1300662
cmpui 9665817
cmpuu 1432317952
divii 14010109
diviiz 0
divirz 0
divisz 0
divriz 0
divrrz 501
divrsz 0
divsi_rem 0
divsiz 0
divsrz 0
divss 0
divss_rem 0
divssz 0
dvdii 16545358
dvdiiz 3246
dvdis 33569
dvdisz 0
dvdiu 576535
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdiiz 0
dvmdis 0
dvmdisz 0
dvmdsBIL 6980498584
dvmdsi 0
dvmdsiz 0
dvmdss 0
dvmdssz 0
dvmduBIL 166266474
equalis 1103830
equaliu 2948862
equalsi 1104051
equalui 2948863
evalexpo 13100235573
evallg 92406912148
evalprecp 44639189
evalvalp 78778094
evalvalser 21442008
expi 2127867882
expu 781770028
fixlg 102932130
fractor 7374797
gc_NULL 6957140
gc_bool 48388666
gc_const 14577261029
gc_double 179960854
gc_int 2567015
gc_long 239799150
gc_stoi 150958
gc_ulong 36241915
gc_utoi 469155
gc_utoipos 1119788
get_avma 0
icopy 8854820842
icopyspec 115276708
int_bit 21614338
itor 705537548
itos 455615250
itos_or_0 24006968
itou 174778045
itou_or_0 2995321
leafcopy 4907931358
lg2prec 798042507
maxdd 3123314
maxss 9541415909
maxuu 4749178
mindd 254901
minss 1687287178
minuu 76222006
mod16 236389
mod2 60275827
mod2BIL 100818363
mod32 259
mod4 4674207
mod64 0
mod8 12902700
modis 19602559
modisz 0
modsi 45222660
modsiz 0
modss 0
modssz 0
mpabs 2126473672
mpabs_shallow 13431858
mpadd 568595799
mpaddz 0
mpaff 674453
mpceil 0
mpcmp 2141135
mpcopy 707
mpdiv 665072
mpexpo 38574468
mpfloor 0
mpmul 830319736
mpmulz 0
mpneg 897941013
mpodd 112561623
mpround 1215585
mpshift 152865099
mpsqr 90060799
mpsub 250199503
mpsubz 0
mptrunc 49
muliiz 0
mulirz 0
mulis 463851267
muliu 354744839
mulri 37872657
mulriz 0
mulrrz 192514
mulrs 7181596
mulru 2766389
mulsiz 0
mulsrz 0
mulssz 0
nbits2lg 2354943885
negi 619863872
negr 3509044
new_chunk 90243321397
rcopy 892436853
rdivii 13001941
rdiviiz 13045633
rdivis 0
rdivsi 0
rdivss 839647
real2n 1058354
real_0 1064991
real_0_bit 472002071
real_1 130111813
real_1_bit 4674503
real_m1 455
real_m2n 126
remii 2533599592
remiiz 0
remis 0
remisz 0
remlll_pre 74914511
remsi 0
remsiz 0
remss 0
remssz 0
rtor 296468321
sdivsi 102150
sdivsi_rem 51424824
sdivss_rem 0
set_avma 124617786329
setabssign 2192688343
shift_left 7378332805
shift_right 5594007267
shiftl 0
shiftlr 0
shiftr 177553933
shiftr_inplace 475107613
smodis 21139673
smodss 12453098
stack_calloc 109136
stack_calloc_align 3318
stack_malloc 46110927
stack_malloc_align 54709649
stackdummy 3447113622
stoi 734587908
stor 489621795
subii 7509861741
subiiz 28
subir 3003826
subirz 0
subis 170944
subisz 0
subiu 128804892
subri 6016017
subriz 0
subrr 988561071
subrrz 1296706
subrs 16281392
subrsz 0
subsi 5894778
subsiz 0
subsrz 0
subss 25067
subssz 0
subui 132977112
subuu 25067
togglesign 1915319437
togglesign_safe 124579662
truedivii 46026251
truedivis 249240
truedivsi 6201919
uabsdiviu_rem 11892741
uabsdivui_rem 15833
udivuu_rem 158853294
ugcdiu 211386
ugcdui 2737
umodi2n 49131884
umodsu 720661636
umodui 1289578
umuluu_le 5630478
umuluu_or_0 5523751
utoi 11641497030
utoineg 262868341
utoipos 13890756926
utor 13418065
uutoi 8625265740
uutoineg 319107
vali 184167166
varncmp 163729978
varnmax 203
varnmin 0

Generated by: LCOV version 1.16