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.1 lcov report (development 30674-be81ecfdd4) Lines: 607 680 89.3 %
Date: 2026-02-12 09:23:52 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Mod64 0
affectsign 0
divsi_rem 0
divss 0
divss_rem 0
dvdiiz 0
dvdisz 0
dvdiuz 0
dvmdis 0
dvmdsi 0
dvmdss 0
get_avma 0
mod64 0
modss 0
mpceil 0
mpfloor 0
rdivis 0
rdivsi 0
remis 0
remsi 0
remss 0
sdivss_rem 0
shiftl 0
shiftlr 0
mptrunc 49
real_m2n 126
absr 140
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 2851
stack_calloc_align 3307
varnmin 14728
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cmprs 40996
cgetr_block 43616
sdivsi 102149
stack_calloc 110381
gc_stoi 155878
dvdui 167195
subis 170918
Fl_ellj_pre 238074
mod16 241108
mindd 264337
truedivis 266927
cmpri 282310
Mod32 311108
uutoineg 362603
Mod16 389733
cgetg_block 424959
gc_utoi 468530
dvdiu 576270
mpdiv 665629
cmpsr 796093
rdivss 839647
real2n 1067063
addri 1106281
gc_utoipos 1153475
real_0 1156534
equalis 1185417
equalsi 1185599
mpround 1216587
absrnz_equal2n 1292589
umodui 1296275
cmpss 1392943
Mod8 2074039
mpcmp 2226344
Mod2 2370181
udivuu_rem 2418330
gc_int 2631152
mulru 2765892
subir 3005095
equaliu 3018226
equalui 3018226
itou_or_0 3041737
maxdd 3178570
cmpis 3634918
negr 3671325
cmpsi 3866917
ceildivuu 3903446
Fl_center 4486133
absrnz_equal1 4519804
real_1_bit 4705177
maxuu 4814800
mod4 5084643
umuluu_or_0 5495072
umuluu_le 5803291
subsi 6093978
subri 6103177
truedivsi 6202031
affsi 6373400
mulrs 7181596
fractor 7376922
gc_NULL 7963142
cmpir 9447572
ugcdiu 10112171
cmpiu 10134120
cmpui 10134143
affectsign_safe 10727417
uabsdiviu_rem 11892741
addrs 12304753
smodss 12811496
rdivii 13104094
rdiviiz 13146968
mod8 13162104
mpabs_shallow 13428463
utor 13461794
affur 13461885
divii 14056743
subrs 16475764
dvdii 16561481
Fl_halve 18809798
modis 19638526
int_bit 20929282
smodis 21176060
evalvalser 21528999
hammingu 24048429
abscmpiu 33257466
abscmpui 33257613
mulri 38033891
mpexpo 38871280
absequaliu 39398218
absequalui 41147143
itos_or_0 43599844
Mod4 43781807
modsi 45225499
affui 45473824
Fl_div 46557855
stack_malloc 46625015
truedivii 47005726
umodi2n 48925807
sdivsi_rem 51429829
gc_bool 51986079
gc_ulong 52059421
affrr_fixlg 54653119
stack_malloc_align 55496837
absi_shallow 58306701
mod2 61113282
Fl_addmulmul_pre 64591400
minuu 69778403
remlll_pre 76222852
evalprecp 78666539
evalvalp 81624149
mpsqr 91031323
Fl_triple 94673859
Fl_sqr 95894638
addiu 97188776
addui 100832877
mod2BIL 103305821
fixlg 104195764
mpodd 115076531
icopyspec 117433235
togglesign_safe 125529708
real_1 129800491
subiu 131849136
subui 136822396
mpshift 153310236
dvmduBIL 166308704
shiftr 177974320
itou 178274857
addis 181590609
gc_double 184154815
vali 190380135
varncmp 217197875
gc_long 242459599
mpsub 251586778
utoineg 293975128
cgetineg 294836781
rtor 295257237
addsi 306776191
muliu 374405867
itos 462127312
shiftr_inplace 464406961
mulis 466257296
Fl_double 469357820
addir 481396150
real_0_bit 481475981
affsr 486070736
stor 486424235
mpadd 576375560
negi 636795824
itor 715019751
Fl_neg 724126032
umodsu 734154935
stoi 773645827
expu 775401461
lg2prec 800007330
mpmul 839695902
rcopy 903196311
affii 910975482
mpneg 916771466
subrr 1000412649
cgetg_copy 1480325912
cmpuu 1492942648
cgetr 1840521408
togglesign 1912529009
minss 2011309046
absi 2067481710
mpabs 2138287931
Fl_sqr_pre 2175888559
setabssign 2205001008
nbits2lg 2368247331
Fl_mul 2422132125
expi 2448774348
addrr 2880192313
remii 3007374061
adduu 3412767997
stackdummy 3646605914
Fl_mul_pre 4092072838
Fl_add 4380790894
leafcopy 4975849286
shift_right 5635499577
dvmdsBIL 7014495359
Fl_sub 7286226726
subii 7641624764
shift_left 7678519544
Fl_addmul_pre 7678621983
uutoi 8811581102
icopy 9053868739
maxss 9717742034
utoi 11902867559
addii 12411141250
evalexpo 13144366780
utoipos 14151583749
gc_const 15513108635
cgetipos 16320238899
cgetg 24571358362
cgeti 27088906406
new_chunk 93254025188
evallg 95225588725
set_avma 129026845871

Generated by: LCOV version 1.16