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 30773-2078653b96) Lines: 607 680 89.3 %
Date: 2026-04-04 09:27:12 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 6141593920
Fl_addmul_pre 7653142591
Fl_addmulmul_pre 64584409
Fl_center 4486010
Fl_div 46820316
Fl_double 441996853
Fl_ellj_pre 238046
Fl_halve 18770033
Fl_mul 2439110733
Fl_mul_pre 4219262139
Fl_neg 729328303
Fl_sqr 99465912
Fl_sqr_pre 2336759264
Fl_sub 7393812758
Fl_triple 87220151
Mod16 389733
Mod2 2370179
Mod32 311108
Mod4 43842142
Mod64 0
Mod8 2073808
abscmpiu 32827862
abscmpui 32828048
absequaliu 39546362
absequalui 41296368
absi 2067014533
absi_shallow 56881942
absr 19040
absrnz_equal1 4553860
absrnz_equal2n 1300268
addii 12530379940
addir 483041906
addis 194699374
addiu 97721284
addri 1106186
addrr 2931601615
addrs 12360975
addsi 319885447
addss 25067
addui 101796249
adduu 3447805267
affectsign 0
affectsign_safe 10730471
affii 964513690
affrr_fixlg 56108216
affsi 6446286
affsr 501163515
affui 45491532
affur 14335209
ceildivuu 3903042
cgetg 25523842235
cgetg_block 426429
cgetg_copy 1490121183
cgeti 27467831519
cgetineg 298673448
cgetipos 16457132877
cgetr 1875720698
cgetr_block 44269
cmpir 9445949
cmpis 3634509
cmpiu 12982461
cmpri 284263
cmprs 40996
cmpsi 3866508
cmpsr 796099
cmpss 1392943
cmpui 12982269
cmpuu 1490460051
divii 14046629
divsi_rem 0
divss 0
divss_rem 0
dvdii 16896053
dvdiiz 0
dvdis 33737
dvdisz 0
dvdiu 576273
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7149595421
dvmdsi 0
dvmdss 0
dvmduBIL 165641803
equalis 1151285
equaliu 3021714
equalsi 1151466
equalui 3021713
evalexpo 13390975029
evallg 96837134979
evalprecp 78670808
evalvalp 81627573
evalvalser 24359582
expi 2424501380
expu 796815641
fixlg 105718958
fractor 7379018
gc_NULL 7963183
gc_bool 56771724
gc_const 15646945529
gc_double 184172111
gc_int 2742582
gc_long 242622553
gc_stoi 155902
gc_ulong 52087584
gc_utoi 468804
gc_utoipos 1153590
get_avma 0
hammingu 24048676
icopy 9150820952
icopyspec 117797146
int_bit 20938520
itor 716723429
itos 476311316
itos_or_0 44911492
itou 179080662
itou_or_0 3147015
leafcopy 5061589897
lg2prec 815692788
maxdd 3211653
maxss 9704268381
maxuu 6610957
mindd 264379
minss 2025965699
minuu 69627721
mod16 307028
mod2 62590034
mod2BIL 107447045
mod32 259
mod4 5140602
mod64 0
mod8 15586647
modis 19638526
modsi 45242170
modss 0
mpabs 2137964475
mpabs_shallow 13428463
mpadd 572953792
mpceil 0
mpcmp 2226374
mpcopy 665
mpdiv 665523
mpexpo 38876731
mpfloor 0
mpmul 837048787
mpneg 926443879
mpodd 116092793
mpround 1216580
mpshift 153498720
mpsqr 91027860
mpsub 251520373
mptrunc 49
mulis 467118836
muliu 373247655
mulri 38284535
mulrs 7181596
mulru 2765892
nbits2lg 2402998987
negi 640792519
negr 3682548
new_chunk 95111558513
rcopy 916759668
rdivii 13106272
rdiviiz 13149805
rdivis 0
rdivsi 0
rdivss 839647
real2n 1068606
real_0 1157741
real_0_bit 482393218
real_1 133634542
real_1_bit 4714058
real_m1 455
real_m2n 126
remii 3060802404
remis 0
remlll_pre 75668739
remsi 0
remss 0
rtor 303768706
sdivsi 102148
sdivsi_rem 51446498
sdivss_rem 0
set_avma 131326603319
setabssign 2205037941
shift_left 7795360660
shift_right 5732762975
shiftl 0
shiftlr 0
shiftr 187925469
shiftr_inplace 467155184
smodis 21176088
smodss 12447530
stack_calloc 110679
stack_calloc_align 3325
stack_malloc 46929445
stack_malloc_align 55534670
stackdummy 3684111923
stoi 798953266
stor 501585845
subii 7718345520
subir 3004964
subis 171737
subiu 133394590
subri 6087483
subrr 1006256715
subrs 16536275
subsi 6184888
subss 25067
subui 138370469
subuu 25067
thuemorseu 3313
togglesign 1953453520
togglesign_safe 157287594
truedivii 54737654
truedivis 268375
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2418379
ugcdiu 10319904
ugcdui 2737
umodi2n 48984907
umodsu 734178012
umodui 711392
umuluu_le 7617880
umuluu_or_0 6242508
utoi 12049046688
utoineg 297812836
utoipos 14266928000
utor 14335108
uutoi 8933380774
uutoineg 362555
vali 190832555
varncmp 198759990
varnmax 203
varnmin 10374

Generated by: LCOV version 1.16