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

Generated by: LCOV version 1.16