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 30862-ea47bd413c) Lines: 605 680 89.0 %
Date: 2026-05-05 09:26:54 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 20510
addss 25067
subss 25067
subuu 25067
dvdis 33751
cmprs 40996
cgetr_block 44581
sdivsi 102151
stack_calloc 110656
gc_stoi 155898
dvdui 167195
subis 171740
Fl_ellj_pre 238076
mindd 264387
truedivis 268381
mpdiv 291569
cmpri 303451
mod16 307028
Mod32 311108
uutoineg 362864
Mod16 389733
cgetg_block 424792
gc_utoi 468794
dvdiu 576277
umodui 711392
cmpsr 796207
rdivss 839647
real2n 1068682
addri 1111424
equalis 1151275
equalsi 1151457
gc_utoipos 1153568
real_0 1160612
mpround 1216581
absrnz_equal2n 1302855
cmpss 1392943
Mod8 2073874
mpcmp 2162938
Mod2 2370263
udivuu_rem 2418435
gc_int 2740417
mulru 2766032
subir 3000320
equaliu 3021959
equalui 3021959
itou_or_0 3146617
maxdd 3215339
cmpis 3634206
negr 3695816
cmpsi 3866205
ceildivuu 3903744
Fl_center 4489145
absrnz_equal1 4559263
real_1_bit 4714603
mod4 5141187
subri 6133090
subsi 6184575
truedivsi 6202318
umuluu_or_0 6262008
affsi 6447362
maxuu 6600187
mulrs 7181596
fractor 7389203
umuluu_le 7618608
gc_NULL 7963637
cmpir 9446910
ugcdiu 10319300
affectsign_safe 10730979
uabsdiviu_rem 11892741
addrs 12387680
smodss 12522527
cmpiu 12969777
cmpui 12969831
rdivii 13117501
rdiviiz 13163269
mpabs_shallow 13428463
divii 14038824
utor 14266758
affur 14266869
mod8 15585675
subrs 16568035
dvdii 16904742
Fl_halve 18772583
modis 19638526
int_bit 20987914
smodis 21176102
hammingu 24048670
evalvalser 25308636
abscmpui 32360142
abscmpiu 32360279
mulri 38601510
mpexpo 38877008
absequaliu 39545861
absequalui 41295876
Mod4 43874490
itos_or_0 44886177
modsi 45242206
affui 45491533
Fl_div 46792539
stack_malloc 46932798
umodi2n 49017863
sdivsi_rem 51446820
gc_ulong 51689521
truedivii 54735525
stack_malloc_align 55537822
affrr_fixlg 56155871
absi_shallow 56411643
gc_bool 56820628
mod2 62590055
Fl_addmulmul_pre 64575159
minuu 69822990
remlll_pre 75676126
evalprecp 78674142
evalvalp 81630792
Fl_triple 87498650
mpsqr 90778613
addiu 96810047
Fl_sqr 99477274
addui 100883550
fixlg 105905056
mod2BIL 107450249
mpodd 116094474
icopyspec 118080282
subiu 133461715
real_1 133780575
subui 138438835
mpshift 153478742
togglesign_safe 157282775
dvmduBIL 165719834
itou 179100202
gc_double 184138848
shiftr 188313725
vali 191309831
addis 194832001
varncmp 199749697
gc_long 242716736
mpsub 249746484
utoineg 298340837
cgetineg 299201332
rtor 303881840
addsi 320019416
muliu 373432155
Fl_double 443570317
shiftr_inplace 467096780
mulis 467116703
itos 476280174
addir 483320917
real_0_bit 492463465
affsr 501622191
stor 501931088
mpadd 572031428
negi 641223517
itor 717464813
Fl_neg 729152681
umodsu 734161154
expu 797511711
stoi 799405007
lg2prec 816826003
mpmul 834881139
rcopy 917310526
mpneg 928284547
affii 964865651
subrr 1011272688
cmpuu 1484584405
cgetg_copy 1493514771
cgetr 1878687964
togglesign 1955945464
minss 2029909455
absi 2070378769
mpabs 2141317230
setabssign 2208727396
Fl_sqr_pre 2338911791
nbits2lg 2408230323
expi 2426502537
Fl_mul 2436012523
addrr 2939885614
remii 3062403852
adduu 3448431427
stackdummy 3686057680
Fl_mul_pre 4221246489
leafcopy 5068508868
shift_right 5741714465
Fl_add 6151260477
dvmdsBIL 7158927255
Fl_sub 7391811781
Fl_addmul_pre 7660536568
subii 7719944827
shift_left 7807792100
uutoi 8939592827
icopy 9158271722
maxss 9682962384
utoi 12054784672
addii 12535561999
evalexpo 13428176303
utoipos 14271921879
gc_const 15659351555
cgetipos 16455690977
cgetg 25573130789
cgeti 27488473942
new_chunk 95236906904
evallg 96951378912
set_avma 131490609709

Generated by: LCOV version 1.16