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 30766-abc2a9856c) Lines: 605 680 89.0 %
Date: 2026-03-27 09:27:04 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 19040
addss 25067
subss 25067
subuu 25067
dvdis 33730
cmprs 40996
cgetr_block 44220
sdivsi 102151
stack_calloc 110667
gc_stoi 155899
dvdui 167195
subis 171740
Fl_ellj_pre 238065
mindd 264380
truedivis 268370
cmpri 284263
mod16 307014
Mod32 311108
uutoineg 363845
Mod16 389733
cgetg_block 426268
gc_utoi 468802
dvdiu 576278
mpdiv 665508
cmpsr 796108
rdivss 839647
real2n 1068594
addri 1106172
equalis 1151250
equalsi 1151431
gc_utoipos 1153591
real_0 1157704
mpround 1216581
umodui 1290953
absrnz_equal2n 1300235
cmpss 1392943
Mod8 2074270
mpcmp 2226333
Mod2 2370275
udivuu_rem 2418379
gc_int 2742584
mulru 2765892
subir 3004981
equaliu 3021717
equalui 3021718
itou_or_0 3147001
maxdd 3211627
cmpis 3634531
negr 3682977
cmpsi 3866528
ceildivuu 3902158
Fl_center 4486178
absrnz_equal1 4553966
real_1_bit 4713976
mod4 5141030
subri 6068738
subsi 6184705
truedivsi 6202031
umuluu_or_0 6259254
affsi 6446104
maxuu 6611004
mulrs 7181596
fractor 7379033
umuluu_le 7617880
gc_NULL 7962085
cmpir 9458790
ugcdiu 10320905
affectsign_safe 10732489
uabsdiviu_rem 11892741
addrs 12361079
smodss 12721871
cmpui 12988141
cmpiu 12988150
rdivii 13107842
rdiviiz 13150682
mpabs_shallow 13428463
divii 14066223
utor 14334954
affur 14335056
mod8 15585285
subrs 16536454
dvdii 16903653
Fl_halve 18828240
modis 19638526
int_bit 20950650
smodis 21176081
hammingu 24048656
evalvalser 24359582
abscmpiu 34337580
abscmpui 34337666
mulri 38284837
mpexpo 38877820
absequaliu 39540859
absequalui 41290863
Mod4 43861300
itos_or_0 44911808
modsi 45242078
affui 45491532
Fl_div 46834912
stack_malloc 46928816
umodi2n 49005990
sdivsi_rem 51446428
gc_ulong 52098345
truedivii 54727400
stack_malloc_align 55537886
affrr_fixlg 56108392
gc_bool 56173914
absi_shallow 58387136
mod2 61680642
Fl_addmulmul_pre 64692197
minuu 69643510
remlll_pre 75995490
evalprecp 78674591
evalvalp 81631270
mpsqr 91050285
Fl_triple 91427986
Fl_sqr 99568939
addiu 100737736
addui 104812802
fixlg 105718647
mod2BIL 106537573
mpodd 115183744
icopyspec 117797467
subiu 133396122
real_1 133627833
subui 138372104
mpshift 153564875
togglesign_safe 157346279
dvmduBIL 159236152
itou 179067597
gc_double 184180207
shiftr 187940964
vali 190833771
addis 194725406
varncmp 198758908
gc_long 242627162
mpsub 251638401
utoineg 297820500
cgetineg 298682030
rtor 303769983
addsi 319912623
muliu 376436096
Fl_double 453842037
mulis 467129104
shiftr_inplace 467466094
itos 476303998
addir 483063409
real_0_bit 484478968
affsr 501386260
stor 501749198
mpadd 574852948
negi 640887612
itor 717220593
Fl_neg 723774962
umodsu 734197246
expu 796824753
stoi 797207557
lg2prec 816279548
mpmul 839206964
rcopy 916895715
mpneg 926569674
affii 966635693
subrr 1006527984
cgetg_copy 1482398742
cmpuu 1490485599
cgetr 1876498738
togglesign 1954084262
minss 2026397292
absi 2067130638
mpabs 2138113521
setabssign 2205164944
Fl_sqr_pre 2351612036
nbits2lg 2404853812
expi 2423611674
Fl_mul 2444342308
addrr 2934778088
remii 3060922682
adduu 3453335188
stackdummy 3670831147
Fl_mul_pre 4244182404
leafcopy 5004262535
shift_right 5738370550
Fl_add 6155414756
dvmdsBIL 7154832539
Fl_sub 7458021990
Fl_addmul_pre 7694406439
subii 7720229478
shift_left 7801110399
uutoi 8956161193
icopy 9068428069
maxss 9751081294
utoi 12078090280
addii 12555195671
evalexpo 13407637187
utoipos 14295220932
gc_const 15649250459
cgetipos 16478407219
cgetg 25487187721
cgeti 27508711793
new_chunk 95000505947
evallg 96765364064
set_avma 131250530200

Generated by: LCOV version 1.16