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 30480-572da319a6) Lines: 605 680 89.0 %
Date: 2025-08-22 09:24:07 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 15547
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33912
cmprs 40996
cgetr_block 43597
sdivsi 102149
stack_calloc 110141
gc_stoi 155883
dvdui 167195
subis 170994
mod16 236596
Fl_ellj_pre 242626
truedivis 266822
mindd 270154
cmpri 282310
Mod32 311108
uutoineg 355941
Mod16 389733
cgetg_block 393643
gc_utoi 468583
dvdiu 576569
mpdiv 667721
cmpsr 795892
rdivss 839647
real2n 1067394
addri 1109262
gc_utoipos 1153903
real_0 1156024
equalis 1181609
equalsi 1181791
mpround 1216538
absrnz_equal2n 1288745
umodui 1296416
cmpss 1427033
Mod8 2070208
mpcmp 2227470
udivuu_rem 2416391
Mod2 2479841
gc_int 2574347
mulru 2765822
equaliu 2995656
equalui 2995657
subir 3006719
itou_or_0 3054268
maxdd 3163634
cmpis 3633544
negr 3670227
ceildivuu 3846788
cmpsi 3865515
Fl_center 4485589
absrnz_equal1 4515871
mod4 4700807
real_1_bit 4705639
maxuu 4805055
umuluu_or_0 5495864
umuluu_le 5800680
subri 6111043
subsi 6112189
truedivsi 6202031
affsi 6383017
mulrs 7181596
fractor 7376310
gc_NULL 7968270
cmpir 9425420
ugcdiu 10086404
cmpui 10115436
cmpiu 10115700
affectsign_safe 10736343
uabsdiviu_rem 11892741
addrs 12304883
smodss 12535017
rdivii 13100492
rdiviiz 13144330
mod8 13271282
mpabs_shallow 13428463
utor 13460150
affur 13460232
divii 14060509
subrs 16476404
dvdii 16480494
Fl_halve 18020804
modis 19638518
smodis 21176255
evalvalser 21443044
int_bit 22256921
hammingu 24045858
abscmpiu 32487573
abscmpui 32487705
mulri 38034263
mpexpo 38854099
absequaliu 39649933
absequalui 41398834
itos_or_0 43581327
Mod4 44347189
modsi 45225502
affui 45473825
Fl_div 46505741
stack_malloc 46631188
truedivii 46807679
umodi2n 49598275
sdivsi_rem 51429830
gc_bool 51916829
gc_ulong 52151191
stack_malloc_align 55484817
affrr_fixlg 55796360
absi_shallow 57538257
Fl_addmulmul_pre 60059608
mod2 61148022
minuu 69198135
remlll_pre 75488447
evalprecp 78666963
evalvalp 81623444
mpsqr 90962610
Fl_sqr 94859751
addiu 95359923
Fl_triple 95544299
addui 99009263
mod2BIL 103333168
fixlg 105292048
mpodd 115079351
icopyspec 117008932
togglesign_safe 125524052
real_1 131209626
subiu 131648342
subui 136342076
mpshift 153203453
dvmduBIL 163290520
itou 177063431
shiftr 180841411
addis 181706861
gc_double 184425407
vali 190294086
varncmp 217201655
gc_long 241789135
mpsub 251446711
utoineg 294206416
cgetineg 295064648
rtor 300455731
addsi 306890966
muliu 372507258
itos 461714941
mulis 463139944
Fl_double 473995536
real_0_bit 478074557
shiftr_inplace 478368438
addir 479716074
affsr 495336032
stor 495648138
mpadd 573877493
negi 637435569
itor 713044261
Fl_neg 716237288
umodsu 724152364
stoi 773046429
expu 786997625
lg2prec 807091889
mpmul 836881233
rcopy 905581730
affii 909091208
mpneg 917826969
subrr 1000921982
cgetg_copy 1479681592
cmpuu 1492922794
cgetr 1856810740
togglesign 1914531096
minss 2008916040
absi 2060448753
mpabs 2131680525
Fl_sqr_pre 2163411945
setabssign 2198339441
nbits2lg 2380585831
Fl_mul 2413788936
expi 2454134486
addrr 2881095336
remii 3011342413
adduu 3410617194
stackdummy 3640773981
Fl_mul_pre 4080637361
Fl_add 4357752501
leafcopy 4968190215
shift_right 5671356559
dvmdsBIL 7089286094
Fl_sub 7286437271
Fl_addmul_pre 7642595378
subii 7663821044
shift_left 7753412390
uutoi 8808707153
icopy 9055719788
maxss 9721480088
utoi 11900249019
addii 12406311350
evalexpo 13257670840
utoipos 14148050549
gc_const 15511194533
cgetipos 16314682029
cgetg 24651503147
cgeti 27128466600
new_chunk 93427127803
evallg 95444383632
set_avma 129262335341

Generated by: LCOV version 1.16